Detach(in HierarchyNode)
Severs a hierarchy node from its parent, without removing it from the hierarchy.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.Hierarchy
- Assembly: UnityEngine.HierarchyCoreModule
Detach(HierarchyNode)
public void Detach(in HierarchyNode node)
Parameters
The hierarchy node to detach.
Remarks
A detached node keeps its own children but is no longer reachable from Hierarchy.Root, so it does not appear in a HierarchyFlattened or a HierarchyViewModel. Nothing reclaims it: the caller must either re-attach it with Hierarchy.SetParent or delete it with Hierarchy.Remove.