GetGlobalObjectIdSlow
Obtains the unique object identifiers based on an object reference.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
GetGlobalObjectIdSlow(Object)
Obtains the unique object identifiers based on an object reference.
public static GlobalObjectId GetGlobalObjectIdSlow(Object targetObject)
Parameters
The object to obtain the unique identifier for.
Returns
Type | Description |
|---|---|
| GlobalObjectId | The |
Remarks
This method is slow. Use it sparingly. To get unique identifiers for multiple objects, it's recommended to use GlobalObjectId.GetGlobalObjectIdsSlow instead of making multiple calls to this method. If you use this method in a large project within other performance-sensitive contexts such as ISerializationCallbackReceiver.OnBeforeSerialize or ISerializationCallbackReceiver.OnAfterDeserialize, it's strongly recommended to profile the performance impact.
Additional Resources: GlobalObjectId.GetGlobalObjectIdsSlow, Object.GetInstanceID()
GetGlobalObjectIdSlow(int)
Obtains the unique object identifiers based on an instance ID.
public static GlobalObjectId GetGlobalObjectIdSlow(int instanceId)
Parameters
The instance ID of the object to obtain the unique identifier for.
Returns
Type | Description |
|---|---|
| GlobalObjectId | The |
Remarks
This method is slow. Use it sparingly. To get unique identifiers for multiple objects, it's recommended to use GlobalObjectId.GetGlobalObjectIdsSlow instead of making multiple calls to this method. If you use this method in a large project within other performance-sensitive contexts such as ISerializationCallbackReceiver.OnBeforeSerialize or ISerializationCallbackReceiver.OnAfterDeserialize, it's strongly recommended to profile the performance impact.
Additional Resources: GlobalObjectId.GetGlobalObjectIdsSlow, Object.GetInstanceID()