# GetGlobalObjectIdSlow

> Obtains the unique object identifiers based on an object reference.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## GetGlobalObjectIdSlow(Object)

Obtains the unique object identifiers based on an object reference.

```csharp
public static GlobalObjectId GetGlobalObjectIdSlow(Object targetObject)
```

### Parameters

**** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)): The object to obtain the unique identifier for.

### Returns

| Type                                                                            | Description                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GlobalObjectId](/engine/6000.7/script-reference/unityeditor/globalobjectid.md) | The `GlobalObjectId` for the object. If the conversion is unsuccessful, then the `GlobalObjectId` is set to the default null ID. The null ID has the string representation `GlobalObjectId_V1-0-00000000000000000000000000000000-0-0` |

### Remarks

This method is slow. Use it sparingly. To get unique identifiers for multiple objects, it's recommended to use [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md) 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](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onbeforeserialize.md) or [ISerializationCallbackReceiver.OnAfterDeserialize](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onafterdeserialize.md), it's strongly recommended to profile the performance impact.

Additional Resources: [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md), [Object.GetInstanceID()](/engine/6000.7/script-reference/unityengine/object/getinstanceid.md)

## GetGlobalObjectIdSlow(int)

Obtains the unique object identifiers based on an instance ID.

> **Warning:**
>
> **Removed.** GlobalObjectId.GetGlobalObjectIdSlow(int) is obsolete. Use GlobalObjectId.GetGlobalObjectIdSlow(EntityId) instead.

```csharp
public static GlobalObjectId GetGlobalObjectIdSlow(int instanceId)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the object to obtain the unique identifier for.

### Returns

| Type                                                                            | Description                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GlobalObjectId](/engine/6000.7/script-reference/unityeditor/globalobjectid.md) | The `GlobalObjectId` for the object. If the conversion is unsuccessful, then the `GlobalObjectId` is set to the default null ID. The null ID has the string representation `GlobalObjectId_V1-0-00000000000000000000000000000000-0-0` |

### Remarks

This method is slow. Use it sparingly. To get unique identifiers for multiple objects, it's recommended to use [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md) 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](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onbeforeserialize.md) or [ISerializationCallbackReceiver.OnAfterDeserialize](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onafterdeserialize.md), it's strongly recommended to profile the performance impact.

Additional Resources: [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md), [Object.GetInstanceID()](/engine/6000.7/script-reference/unityengine/object/getinstanceid.md)

## GetGlobalObjectIdSlow(EntityId)

Obtains the unique object identifiers based on an object reference.

```csharp
public static GlobalObjectId GetGlobalObjectIdSlow(EntityId entityid)
```

### Parameters

**** (\[EntityId]\(/engine/6000.7/script-reference/unityengine/entityid)):&#x20;

### Returns

| Type                                                                            | Description                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GlobalObjectId](/engine/6000.7/script-reference/unityeditor/globalobjectid.md) | The `GlobalObjectId` for the object. If the conversion is unsuccessful, then the `GlobalObjectId` is set to the default null ID. The null ID has the string representation `GlobalObjectId_V1-0-00000000000000000000000000000000-0-0` |

### Remarks

This method is slow. Use it sparingly. To get unique identifiers for multiple objects, it's recommended to use [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md) 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](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onbeforeserialize.md) or [ISerializationCallbackReceiver.OnAfterDeserialize](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver/onafterdeserialize.md), it's strongly recommended to profile the performance impact.

Additional Resources: [GlobalObjectId.GetGlobalObjectIdsSlow](/engine/6000.7/script-reference/unityeditor/globalobjectid/getglobalobjectidsslow.md), [Object.GetInstanceID()](/engine/6000.7/script-reference/unityengine/object/getinstanceid.md)
