diff --git a/src/gaemstone.ECS/Iterator.cs b/src/gaemstone.ECS/Iterator.cs index 8249774..1e3d28c 100644 --- a/src/gaemstone.ECS/Iterator.cs +++ b/src/gaemstone.ECS/Iterator.cs @@ -29,6 +29,8 @@ public unsafe class Iterator : Iterator public new Iterator SetVar(Variable var, Entity entity) => (Iterator)base.SetVar(var, entity); + public new Entity? First() + => Entity.GetOrNull(World, base.First()); public new IEnumerable> GetAllEntities() => base.GetAllEntities().Select(e => Entity.GetOrInvalid(World, e));