Version: 2023.2
언어: 한국어

GfxResourceInfo

struct in UnityEditor.Profiling

매뉴얼로 전환

설명

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.

변수

relatedAllocationRootIdRelated native allocation id of the graphics resource.
relatedInstanceIdRelated instance ID of Unity Object.