Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetOrCreateNode

Gets or creates the HierarchyNode that corresponds to the specified GameObject EntityId.
Read time 1 minuteLast updated 11 days ago

Definition

GetOrCreateNode(EntityId)

Gets or creates the HierarchyNode that corresponds to the specified GameObjectEntityId.
public HierarchyNode GetOrCreateNode(EntityId entityId)

Parameters

entityId

The EntityId of the GameObject to get the HierarchyNode for.

Returns

Type

Description

HierarchyNodeThe 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

gameObject

The GameObject to get the HierarchyNode for.

Returns

Type

Description

HierarchyNodeThe 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.