Version: 2022.2
言語: 日本語

FrameDataView.GetUnityObjectNativeTypeInfo

マニュアルに切り替える
public bool GetUnityObjectNativeTypeInfo (int nativeTypeIndex, out Profiling.FrameDataView.UnityObjectNativeTypeInfo info);

パラメーター

nativeTypeIndex Native type index.
info Native type information output struct with name and other attributes.

戻り値

bool Returns true if type information is available.

説明

Gets native Unity type intormation.

using UnityEditorInternal;
using UnityEditor.Profiling;

public class Example { public static string GetInstanceName(int frame, int instanceId) { using (var frameData = ProfilerDriver.GetRawFrameDataView(frame, 0)) { if (!frameData.GetUnityObjectInfo(instanceId, out var info)) return "N/A"; return (frameData.GetUnityObjectNativeTypeInfo(info.nativeTypeIndex, out var typeInfo)) ? typeInfo.name + ": " + info.name : info.name; } } }