Skip to content

Commit

Permalink
Merge pull request #593 from VeyronSakai/fix/set-parent
Browse files Browse the repository at this point in the history
Suppress warning by using SetParent()
  • Loading branch information
hadashiA committed Dec 18, 2023
2 parents 2b972fe + 692a6af commit bdf4585
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -137,10 +137,10 @@ public static T Instantiate<T>(this IObjectResolver resolver, T prefab, Transfor
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

1 comment on commit bdf4585

@vercel
Copy link

@vercel vercel bot commented on bdf4585 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.