# GetGfxResourceInfo(ulong, out GfxResourceInfo)

> Gets information for a given graphics resource identifier.

## Definition

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

## GetGfxResourceInfo(ulong, GfxResourceInfo)

```csharp
public bool GetGfxResourceInfo(ulong gfxResourceId, out FrameDataView.GfxResourceInfo info)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Graphics resource identifier.**** (\[GfxResourceInfo]\(/engine/6000.5/script-reference/unityeditor/profiling/framedataview/gfxresourceinfo)): Graphics resource information output struct with entityId and other attributes.

### Returns

| Type                                                          | Description                                                                    |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if resource exists in the frame and the information is available. |

### Remarks

Use this function to retrieve information about related Unity Objects for the graphics resource in the Profiler capture. On the Render Thread, the Profiler capture can be associated with a graphics resource representing a Texture, RenderTexture, Mesh Asset, or other graphics resource. This information is included as part of the sample metadata; you can use the [RawFrameDataView.GetSampleMetadataAsInt](/engine/6000.5/script-reference/unityeditor/profiling/rawframedataview/getsamplemetadataasint.md) or [HierarchyFrameDataView.GetItemEntityId](/engine/6000.5/script-reference/unityeditor/profiling/hierarchyframedataview/getitementityid.md) functions to retrieve this metadata.

### 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.relatedEntityId, out var objectInfo))
                    return objectInfo.name;
            }
            return "N/A";
        }
    }
}
```
