Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

HierarchyGameObjectHandler.GetOrCreateNode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public HierarchyNode GetOrCreateNode(EntityId entityId);

Parameters

Parameter Description
entityId The game object entity id.

Returns

HierarchyNode An hierarchy node.

Description

Gets or creates the hierarchy node corresponding to the given game object entity id.

If the node hasn't been created yet, returns the future node that will be used for the game object. An update of the hierarchy will be necessary if you intend to query the hieararchy about this node.


Declaration

public HierarchyNode GetOrCreateNode(GameObject gameObject);

Parameters

Parameter Description
gameObject The game object.

Returns

HierarchyNode An hierarchy node.

Description

Gets or creates the hierarchy node corresponding to the given game object.

If the node hasn't been created yet, returns the future node that will be used for the game object. An update of the hierarchy will be necessary if you intend to query the hieararchy about this node.