diff --git a/src/gaemstone/ECS/Entity.cs b/src/gaemstone/ECS/Entity.cs index f06cc15..63b2abc 100644 --- a/src/gaemstone/ECS/Entity.cs +++ b/src/gaemstone/ECS/Entity.cs @@ -39,6 +39,7 @@ public readonly struct Entity public static readonly Entity None = default; public readonly ecs_entity_t Value; + public uint ID => (uint)Value.Data; public bool IsSome => Value.Data != 0; public bool IsNone => Value.Data == 0; diff --git a/src/gaemstone/ECS/EntityRef.cs b/src/gaemstone/ECS/EntityRef.cs index 60a6ca1..d1315a0 100644 --- a/src/gaemstone/ECS/EntityRef.cs +++ b/src/gaemstone/ECS/EntityRef.cs @@ -12,6 +12,7 @@ public unsafe sealed class EntityRef { public override Universe Universe { get; } public Entity Entity { get; } + public uint ID => Entity.ID; public bool IsValid => ecs_is_valid(Universe, this); public bool IsAlive => ecs_is_alive(Universe, this);