GetOrCreateNode
Gets or creates the HierarchyNode that corresponds to the specified GameObject EntityId.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: Unity.Hierarchy.Editor
- Assembly: UnityEditor
GetOrCreateNode(EntityId)
public HierarchyNode GetOrCreateNode(EntityId entityId)
Parameters
Returns
Type | Description |
|---|---|
| HierarchyNode | The HierarchyNode that corresponds to the specified EntityId. |
Remarks
If the node doesn't exist, this method returns a node that represents the GameObject but that doesn't yet exist in the hierarchy. To query the Hierarchy about this node, update the hierarchy first.
GetOrCreateNode(GameObject)
Gets or creates the HierarchyNode that corresponds to the specified GameObject.
public HierarchyNode GetOrCreateNode(GameObject gameObject)
Parameters
The GameObject to get the HierarchyNode for.
Returns
Type | Description |
|---|---|
| HierarchyNode | The HierarchyNode that corresponds to the specified GameObject. |
Remarks
If the node doesn't exist, this method returns a node that represents the GameObject but that doesn't yet exist in the Hierarchy. To query the Hierarchy about this node, update the hierarchy first.