diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs index 87fc0163c..9f9d4fd70 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs @@ -392,7 +392,10 @@ namespace UniGLTF { if (tmpParent != null) { - tmpParent.transform.GetChild(0).SetParent(null); + var child = tmpParent.transform.GetChild(0); + child.SetParent(null); + Copy = child.gameObject; + if (Application.isPlaying) { GameObject.Destroy(tmpParent);