Provides methods for retrieving graphics resource information.
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"; } } }
Additional resources: FrameDataView.GetGfxResourceInfo.
relatedAllocationRootId | Related native allocation id of the graphics resource. |
relatedInstanceId | Related instance ID of Unity Object. |