diff --git a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs index 95ceceb..31aeabd 100644 --- a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs +++ b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs @@ -34,6 +34,7 @@ namespace Svelto.ECS.Internal void Trim(); void Clear(); bool Has(int entityIdEntityId); + int GetFirstID(); } class TypeSafeDictionary : FasterDictionary, ITypeSafeDictionary where TValue : IEntityStruct @@ -80,6 +81,11 @@ namespace Svelto.ECS.Internal return ContainsKey(entityIdEntityId); } + public int GetFirstID() + { + return FasterValues[0].ID.entityID; + } + void AddEntityViewToEngines(Dictionary> entityViewEnginesDB, ref TValue entity) { FasterList entityViewsEngines;