Browse Source

Fix TypeSafeDictionary.AddEntityToDictionary was using the entityID from the original group instead the target entityID

pull/50/head
Jose Luis Rey Mendez 4 years ago
parent
commit
ada62614a0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      Svelto.ECS/DataStructures/TypeSafeDictionary.cs

+ 2
- 2
Svelto.ECS/DataStructures/TypeSafeDictionary.cs View File

@@ -128,7 +128,7 @@ namespace Svelto.ECS.Internal
if (_hasEgid)
SetEGIDWithoutBoxing<TValue>.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<TValue>.SetIDWithoutBoxing(ref entity, toEntityID);

toGroupCasted.Add(fromEntityGid.entityID, entity);
toGroupCasted.Add(toEntityID.entityID, entity);
}
}
}


Loading…
Cancel
Save