diff --git a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs index 73a9229..089fde8 100644 --- a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs +++ b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs @@ -128,7 +128,7 @@ namespace Svelto.ECS.Internal if (_hasEgid) SetEGIDWithoutBoxing.SetIDWithoutBoxing(ref entity, toEntityID); - toGroupCasted.Add(fromEntityGid.entityID, entity); + toGroupCasted.Add(toEntityID.entityID, entity); } } else @@ -144,7 +144,7 @@ namespace Svelto.ECS.Internal if (_hasEgid) SetEGIDWithoutBoxing.SetIDWithoutBoxing(ref entity, toEntityID); - toGroupCasted.Add(fromEntityGid.entityID, entity); + toGroupCasted.Add(toEntityID.entityID, entity); } } }