mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-04-24 23:18:04 -05:00
Remove RuntimeGltfInstance before saving a prefab.
This commit is contained in:
parent
616f386a29
commit
6b43069eb9
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user