mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-11-12 14:55:56 +08:00
add custom inspector for EcsEntity
This commit is contained in:
parent
32f999b898
commit
21e5b61cbc
@ -104,4 +104,22 @@ namespace DCFApixels.DragonECS
|
||||
get => _entity.IsAlive();
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
namespace Editors
|
||||
{
|
||||
using UnityEditor;
|
||||
[CustomEditor(typeof(EcsEntity))]
|
||||
public class EcsEntityEditor : Editor
|
||||
{
|
||||
private EcsEntity Target => (EcsEntity)target;
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.IntField(Target._entity.id);
|
||||
GUILayout.Label(Target._entity.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user