# DetachChildren()

> Unparents all children.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public void DetachChildren()
```

### Remarks

Useful if you want to destroy the root of a hierarchy without destroying the children.

Additional Resources: [Transform.parent](/engine/6000.0/script-reference/unityengine/transform/parent.md) to detach/change the parent of a single transform.
