mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-11 05:19:14 -05:00
set Copy to child before destroying tmpParent
fix
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user