EntityIdsToGUIDs
Converts a native array of EntityIds to the GUIDs of the matching assets.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
EntityIdsToGUIDs(NativeArray<EntityId>, NativeArray<GUID>)
Converts a native array of EntityIds to the GUIDs of the matching assets.
public static void EntityIdsToGUIDs(NativeArray<EntityId> entityIds, NativeArray<GUID> guidsOut)
Parameters
The EntityIds to convert.
The array that the method fills with the GUID of each asset.
Remarks
Both arrays must be allocated and have the same length before you call the method. You're responsible for the lifetime of both arrays. If an EntityId isn't valid or doesn't refer to an asset, the method sets the matching GUID to the default value.
EntityIdsToGUIDs(ReadOnlySpan<EntityId>, Span<GUID>)
Converts a span of EntityIds to the GUIDs of the matching assets.
public static void EntityIdsToGUIDs(ReadOnlySpan<EntityId> entityIds, Span<GUID> guidsOut)
Parameters
The EntityIds to convert.
The span that the method fills with the GUID of each asset.
Remarks
Both arrays must be allocated and have the same length before you call the method. You're responsible for the lifetime of both arrays. If an EntityId isn't valid or doesn't refer to an asset, the method sets the matching GUID to the default value. This overload accepts any contiguous block of memory, such as a managed array, a stack-allocated buffer, or a NativeArray.