Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


InstanceIDsToValidArray

Translates an array of instance IDs to an array of bools indicating whether a given instance ID from instanceIDs corresponds to a valid Object in memory. The Object could have been deleted or not loaded into memory yet.
Read time 2 minutesLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

InstanceIDsToValidArray(NativeArray<int>, NativeArray<bool>)

Translates an array of instance IDs to an array of bools indicating whether a given instance ID from instanceIDs corresponds to a valid Object in memory. The Object could have been deleted or not loaded into memory yet.
public static void InstanceIDsToValidArray(NativeArray<int> instanceIDs, NativeArray<bool> validArray)

Parameters

instanceIDs

IDs of Object instances.

Array of bools indicating whether a given instance ID corresponds to a valid Object.

Remarks

instanceIDs and validArray must be of the same length. The value at each index in validArray corresponds with the instance ID at the same index in instanceIDs.

InstanceIDsToValidArray(ReadOnlySpan<int>, Span<bool>)

Translates an array of instance IDs to an array of bools indicating whether a given instance ID from instanceIDs corresponds to a valid Object in memory. The Object could have been deleted or not loaded into memory yet.
public static void InstanceIDsToValidArray(ReadOnlySpan<int> instanceIDs, Span<bool> validArray)

Parameters

IDs of Object instances.

validArray

Array of bools indicating whether a given instance ID corresponds to a valid Object.

Remarks

instanceIDs and validArray must be of the same length. The value at each index in validArray corresponds with the instance ID at the same index in instanceIDs.