# EntityIdsToValidArray

> Converts an array of EntityIds to an array of bool values indicating whether a given EntityId from entityIds corresponds to a valid Object in memory. The Object could have been deleted or not loaded into memory yet.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## EntityIdsToValidArray(NativeArray\<EntityId>, NativeArray\<bool>)

Converts an array of EntityIds to an array of bool values indicating whether a given EntityId from **entityIds** corresponds to a valid [Object](/engine/6000.6/script-reference/unityengine/object.md) in memory. The [Object](/engine/6000.6/script-reference/unityengine/object.md) could have been deleted or not loaded into memory yet.

```csharp
public static void EntityIdsToValidArray(NativeArray<EntityId> entityIDs, NativeArray<bool> validArray)
```

### Parameters

**** (\[NativeArray\<EntityId>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): **** (\[NativeArray\<bool>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Array of bool values indicating whether a given EntityId corresponds to a valid [Object](/engine/6000.6/script-reference/unityengine/object.md).

## EntityIdsToValidArray(ReadOnlySpan\<EntityId>, Span\<bool>)

Converts an array of EntityIds to an array of bool values indicating whether a given EntityId from **entityIds** corresponds to a valid [Object](/engine/6000.6/script-reference/unityengine/object.md) in memory. The [Object](/engine/6000.6/script-reference/unityengine/object.md) could have been deleted or not loaded into memory yet.

```csharp
public static void EntityIdsToValidArray(ReadOnlySpan<EntityId> entityIds, Span<bool> validArray)
```

### Parameters

**** (\[ReadOnlySpan\<EntityId>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): IDs of [Object](/engine/6000.6/script-reference/unityengine/object.md) instances.**** (\[Span\<bool>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): Array of bool values indicating whether a given EntityId corresponds to a valid [Object](/engine/6000.6/script-reference/unityengine/object.md).
