Version: 2023.2

AssetDatabase.InstanceIDsToGUIDs

切换到手册
public static void InstanceIDsToGUIDs (NativeArray<int> instanceIDs, NativeArray<GUID> guidsOut);

描述

Sets a NativeArray of UnityEditor.GUIDs for every valid Instance ID that is an asset.

Both arrays must be the same length and initialised before calling. The caller is responsible for the lifetime of these arrays. If an Instance ID is not valid or does not refer to an Object that is an asset, the GUID will be set to default.