Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetOrCreateNode

Gets or creates the HierarchyNode for the subscene with the specified EntityId.
Read time 1 minuteLast updated 12 days ago

Definition

GetOrCreateNode(EntityId)

Gets or creates the HierarchyNode for the subscene with the specified EntityId.
public HierarchyNode GetOrCreateNode(EntityId entityId)

Parameters

entityId

The EntityId of the subscene to find or create a node for.

Returns

Type

Description

HierarchyNodeThe HierarchyNode for the specified subscene.

Remarks

If the node doesn't exist yet, this method returns a future node that will be used for the scene. Update the Hierarchy before you query it about this node.

GetOrCreateNode(GameObject)

Gets or creates the HierarchyNode for the subscene represented by the specified GameObject.
public HierarchyNode GetOrCreateNode(GameObject gameObject)

Parameters

gameObject

The GameObject that represents the subscene.

Returns

Type

Description

HierarchyNodeThe HierarchyNode for the specified subscene, or HierarchyNode.Null if the GameObject is null.

Remarks

If the node doesn't exist yet, this method returns a future node that will be used for the scene. Update the Hierarchy before you query it about this node.

GetOrCreateNode(Scene)

Gets or creates the HierarchyNode for the specified subscene.
public HierarchyNode GetOrCreateNode(Scene scene)

Parameters

scene

The Scene associated with the subscene.

Returns

Type

Description

HierarchyNodeThe HierarchyNode for the specified subscene.

Remarks

If the node doesn't exist yet, this method returns a future node that will be used for the scene. Update the Hierarchy before you query it about this node.