Version: 2022.3
言語: 日本語

UnityObjectNativeTypeInfo

struct in UnityEditor.Profiling

マニュアルに切り替える

説明

Unity native type information.

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; } } }

変数

baseNativeTypeIndexBase type index.
nameNative type name.