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

> Gets the HierarchyNode corresponding to each EntityId in entityIds. Slots already set to a non-null 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 GetNodesFromEntityIds(ReadOnlySpan<EntityId> entityIds, Span<HierarchyNode> outNodes)
```

### Parameters

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

### Returns

| Type                                                       | Description                                                                                                                                                                                                                                                       |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of slots in `outNodes` still set to [HierarchyNode.Null](/engine/6000.7/script-reference/unity/hierarchy/hierarchynode/null.md) after this handler runs. A return value of 0 means all entity ids were resolved; callers may skip subsequent handlers. |
