Add
Adds a new node that has a specified parent node to the hierarchy.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Hierarchy
- Assembly: UnityEngine.HierarchyCoreModule
Add(HierarchyNode, HierarchyNode)
Adds a new node that has a specified parent node to the hierarchy.
public bool Add(in HierarchyNode parent, out HierarchyNode node)
Parameters
The parent of the new node.
The new node if the command succeeds.
Returns
Type | Description |
|---|---|
| bool | |
Add(HierarchyNode, int, HierarchyNode[])
Adds multiple new nodes that have a specified parent node to the hierarchy.
public bool Add(in HierarchyNode parent, int count, out HierarchyNode[] nodes)
Parameters
The parent of the new nodes.
The number of nodes to create.
The new nodes if the command succeeds.
Returns
Type | Description |
|---|---|
| bool | |
Add(HierarchyNode, Span<HierarchyNode>)
Adds multiple new nodes that have a specified parent node to the hierarchy.
public bool Add(in HierarchyNode parent, Span<HierarchyNode> outNodes)
Parameters
The parent of the new nodes.
The span of nodes filled with new nodes if the command succeeds.
Returns
Type | Description |
|---|---|
| bool | |