19 lines
418 B
C#
Raw Permalink Normal View History

2025-09-08 14:51:28 +08:00
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(GuidComponent))]
public class GuidComponentDrawer : Editor
{
private GuidComponent guidComp;
public override void OnInspectorGUI()
{
if (guidComp == null)
{
guidComp = (GuidComponent)target;
}
// Draw label
EditorGUILayout.LabelField("Guid:", guidComp.GetGuid().ToString());
}
}