---
title: relatedInstanceId
product: Unity Editor
version: '6000.3'
latest_version: '7000.0'
status: This page documents version 6000.3. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.3/script-reference/unityeditor/profiling/framedataview/gfxresourceinfo/relatedinstanceid
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/profiling/framedataview/gfxresourceinfo/relatedinstanceid.md
last_updated: 2026-10-30
generated_at: 2026-11-07T14:24:33.564Z
locale: en-us
---

# relatedInstanceId

> Related instance ID of Unity Object.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor.Profiling](/engine/6000.3/script-reference/unityeditor/profiling.md)
* **Assembly:** UnityEditor

```csharp
public int relatedInstanceId { get; }
```

### Remarks

Graphics resource might be related to the specific Unity Object such as Texture2D, RenderTexture. If *relatedInstanceId* isn't zero use GetUnityObjectInfo to obtain further information about Unity Object.

### Examples

```csharp
using UnityEditorInternal;
using UnityEditor.Profiling;

public class Example
{
    public static string GetGfxResourceName(int frame, ulong gfxResourceId)
    {
        using (var frameData = ProfilerDriver.GetRawFrameDataView(frame, 0))
        {
            if (frameData.GetGfxResourceInfo(gfxResourceId, out var info))
            {
                if (frameData.GetUnityObjectInfo(info.relatedInstanceId, out var objectInfo))
                    return objectInfo.name;
            }
            return "N/A";
        }
    }
}
```
