Version: 2023.2
언어: 한국어

UnityObjectInfo

struct in UnityEditor.Profiling

매뉴얼로 전환

설명

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

변수

allocationRootIdThe native allocation ID of this Unity Object.
nameName of UnityEngine.Object instance.
nativeTypeIndexNative type index of the object instance.
relatedGameObjectInstanceIdThe instance ID of a related Unity Object.