diff --git a/Svelto.ECS/EnginesRoot.Submission.cs b/Svelto.ECS/EnginesRoot.Submission.cs index 08dcc92..94d8b43 100644 --- a/Svelto.ECS/EnginesRoot.Submission.cs +++ b/Svelto.ECS/EnginesRoot.Submission.cs @@ -65,12 +65,10 @@ namespace Svelto.ECS ITypeSafeDictionary dbDic; FasterDictionary groupedGroup = null; if (groupDB.TryGetValue(entityViewTypeSafeDictionary.Key, out dbDic) == false) - { dbDic = groupDB[entityViewTypeSafeDictionary.Key] = entityViewTypeSafeDictionary.Value.Create(); - - if (_groupedGroups.TryGetValue(entityViewTypeSafeDictionary.Key, out groupedGroup) == false) - groupedGroup = _groupedGroups[entityViewTypeSafeDictionary.Key] = new FasterDictionary(); - } + + if (_groupedGroups.TryGetValue(entityViewTypeSafeDictionary.Key, out groupedGroup) == false) + groupedGroup = _groupedGroups[entityViewTypeSafeDictionary.Key] = new FasterDictionary(); //type safe copy dbDic.FillWithIndexedEntities(entityViewTypeSafeDictionary.Value);