# GetEntityId(Hierarchy, in HierarchyNode)

> Get the entity id corresponding to the given hierarchy node.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy](/engine/6000.5/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyModule

## GetEntityId(Hierarchy, HierarchyNode)

```csharp
public static EntityId GetEntityId(this Hierarchy hierarchy, in HierarchyNode node)
```

### Parameters

**** (\[Hierarchy]\(/engine/6000.5/script-reference/unity/hierarchy/hierarchy)): The hierarchy.**** (\[HierarchyNode]\(/engine/6000.5/script-reference/unity/hierarchy/hierarchynode)): The hierarchy node.

### Returns

| Type                                                                | Description |
| ------------------------------------------------------------------- | ----------- |
| [EntityId](/engine/6000.5/script-reference/unityengine/entityid.md) |             |

### Remarks

This method will loop through all IHierarchyEntityIdConverter handlers and return the first valid entity id. It is more efficient to call GetEntityIds when multiple nodes need to be converted.
