mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-21 14:37:49 -05:00
remove gameobject after prefab created.
This commit is contained in:
parent
85c5466fd8
commit
4e321458ee
|
|
@ -140,7 +140,6 @@ namespace VRM
|
|||
m_paths.Add(m_prefabPath);
|
||||
loaded.TransferOwnership(SaveAsAsset);
|
||||
var root = loaded.Root;
|
||||
GameObject.DestroyImmediate(loaded);
|
||||
|
||||
// Create or update Main Asset
|
||||
if (m_prefabPath.IsFileExists)
|
||||
|
|
@ -155,6 +154,9 @@ namespace VRM
|
|||
PrefabUtility.SaveAsPrefabAssetAndConnect(root, m_prefabPath.Value, InteractionMode.AutomatedAction);
|
||||
}
|
||||
|
||||
// destroy GameObject on scene
|
||||
GameObject.DestroyImmediate(root);
|
||||
|
||||
foreach (var x in m_paths)
|
||||
{
|
||||
x.ImportAsset();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user