Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DetachChildren()

Unparents all children.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public void DetachChildren()

Remarks

Useful if you want to destroy the root of a hierarchy without destroying the children.
Additional Resources: Transform.parent to detach/change the parent of a single transform.