Skip to content

Commit

Permalink
use SetParent()
Browse files Browse the repository at this point in the history
  • Loading branch information
VeyronSakai committed Dec 15, 2023
1 parent af7bd4e commit 692a6af
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ static void ResetParent<T>(T instance) where T : UnityEngine.Object
switch (instance)
{
case Component component:
component.transform.parent = null;
component.transform.SetParent(null, false);
break;
case GameObject gameObject:
gameObject.transform.parent = null;
gameObject.transform.SetParent(null, false);
break;
}
}
Expand Down

0 comments on commit 692a6af

Please sign in to comment.