Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

AssetDatabase.EntityIdsToGUIDs

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void EntityIdsToGUIDs(NativeArray<EntityId> entityIds, NativeArray<GUID> guidsOut);

Parameters

Parameter Description
entityIds The EntityIds to convert.
guidsOut The array that the method fills with the GUID of each asset.

Description

Converts a native array of EntityIds to the GUIDs of the matching assets.

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.


Declaration

public static void EntityIdsToGUIDs(ReadOnlySpan<EntityId> entityIds, Span<GUID> guidsOut);

Parameters

Parameter Description
entityIds The EntityIds to convert.
guidsOut The span that the method fills with the GUID of each asset.

Description

Converts a span of EntityIds to the GUIDs of the matching assets.

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.