relatedEntityId
Related EntityId of Unity Object.
읽는 시간 1분최근 업데이트: 2시간 전
Definition
- Type: Property
- Namespace: UnityEditor.Profiling
- Assembly: UnityEditor.CoreModule
public EntityId relatedEntityId { get; }
Remarks
Graphics resource might be related to the specific Unity Object such as Texture2D, RenderTexture. If relatedEntityId isn't zero use GetUnityObjectInfo to obtain further information about Unity Object.
Examples
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.relatedEntityId, out var objectInfo)) return objectInfo.name; } return "N/A"; } }}