Transform.DetachChildrenfunction DetachChildren () : voidDescriptionUnparents all children. Useful if you want to destroy the root of a hierarchy without destroying the children.
JavaScript
transform.DetachChildren(); using UnityEngine; import UnityEngine |
