mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 13:54:45 -05:00
Remove RuntimeGltfInstance before saving a prefab.
This commit is contained in:
@@ -141,6 +141,9 @@ namespace VRM
|
||||
loaded.TransferOwnership(SaveAsAsset);
|
||||
var root = loaded.Root;
|
||||
|
||||
// Remove RuntimeGltfInstance component before saving as a prefab.
|
||||
UnityObjectDestoyer.DestroyRuntimeOrEditor(loaded);
|
||||
|
||||
// Create or update Main Asset
|
||||
if (m_prefabPath.IsFileExists)
|
||||
{
|
||||
@@ -155,7 +158,7 @@ namespace VRM
|
||||
}
|
||||
|
||||
// destroy GameObject on scene
|
||||
GameObject.DestroyImmediate(root);
|
||||
UnityObjectDestoyer.DestroyRuntimeOrEditor(root);
|
||||
|
||||
foreach (var x in m_paths)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user