Version: 2022.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"; } } }

変数

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