DragonECS-Unity/src/DebugUtils/Monitors/EntityMonitor.cs
2026-04-14 15:19:41 +08:00

27 lines
799 B
C#

using DCFApixels.DragonECS.Unity.Editors;
using UnityEngine;
namespace DCFApixels.DragonECS.Unity.Internal
{
[MetaColor(MetaColor.Gray)]
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
[MetaDescription(EcsConsts.AUTHOR, "...")]
[MetaTags(MetaTags.HIDDEN)]
[MetaID("DragonECS_A551B6809201D56AA0F1B51248174B4D")]
internal class EntityMonitor : MonoBehaviour
{
private entlong _entity;
public entlong Entity
{
get { return _entity; }
}
public void Set(entlong entity)
{
_entity = entity;
#if UNITY_EDITOR
var world = entity.GetWorldUnchecked();
world.Get<DragonGUI.EntityLinksComponent>().SetMonitorLink(entity.GetIDUnchecked(), this);
#endif
}
}
}