# GetEntityIdsFromNodes(ReadOnlySpan<HierarchyNode>, Span<EntityId>)

> Gets the EntityId corresponding to each HierarchyNode in nodes. Slots already set to a non- EntityId.None value must be skipped.

## Definition

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

```csharp
public virtual int GetEntityIdsFromNodes(ReadOnlySpan<HierarchyNode> nodes, Span<EntityId> outEntityIds)
```

### Parameters

**** (\[ReadOnlySpan\<HierarchyNode>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The [HierarchyNode](/engine/6000.7/script-reference/unity/hierarchy/hierarchynode.md) values to look up.**** (\[Span\<EntityId>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): Output buffer to fill; must be the same length as `nodes`.

### Returns

| Type                                                       | Description                                                                                                                                                                                                                                        |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of slots in `outEntityIds` still set to [EntityId.None](/engine/6000.7/script-reference/unityengine/entityid/none.md) after this handler runs. A return value of 0 means all nodes were resolved; callers may skip subsequent handlers. |
