From 9ffd58ec86f91fd05a9b3ec4ecfde8ae81a10268 Mon Sep 17 00:00:00 2001 From: Jose Luis Rey Mendez Date: Sat, 14 May 2022 17:37:29 -0300 Subject: [PATCH] Fix compilation error GetGroupFilter does not exist anymore --- .../Core/Filters/EnginesRoot.Filters.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.sebaslab.svelto.ecs/Core/Filters/EnginesRoot.Filters.cs b/com.sebaslab.svelto.ecs/Core/Filters/EnginesRoot.Filters.cs index 979cfab..3541f25 100644 --- a/com.sebaslab.svelto.ecs/Core/Filters/EnginesRoot.Filters.cs +++ b/com.sebaslab.svelto.ecs/Core/Filters/EnginesRoot.Filters.cs @@ -55,17 +55,17 @@ namespace Svelto.ECS var numberOfFilters = listOfFilters.count; for (int filterIndex = 0; filterIndex < numberOfFilters; ++filterIndex) { - //we are going to remove multiple entities, this means that the dictionary count would decrease + //we are going to remove multiple entities, this means that the dictionary count would decrease //for each entity removed from each filter //we need to keep a copy to reset to the original count for each filter var currentLastIndex = (uint)fromDic.count - 1; var filters = _persistentEntityFilters.unsafeValues; var persistentFilter = filters[listOfFilters[filterIndex]]._filtersPerGroup; - + if (persistentFilter.TryGetValue(fromGroup, out var groupFilter)) { var entitiesCount = entityIDs.count; - + for (int entityIndex = 0; entityIndex < entitiesCount; ++entityIndex) { uint fromentityID = entityIDs[entityIndex].Item1; @@ -96,7 +96,7 @@ namespace Svelto.ECS /// entities are actually removed from the dictionary. for (int filterIndex = 0; filterIndex < numberOfFilters; ++filterIndex) { - //we are going to remove multiple entities, this means that the dictionary count would decrease + //we are going to remove multiple entities, this means that the dictionary count would decrease //for each entity removed from each filter //we need to keep a copy to reset to the original count for each filter var currentLastIndex = fromDictionaryCount; @@ -116,7 +116,7 @@ namespace Svelto.ECS var toIndex = toComponentsDictionary.GetIndex(toEntityID); if (groupFilterTo.isValid == false) - groupFilterTo = persistentFilter.GetGroupFilter(toGroup); + groupFilterTo = persistentFilter.GetOrCreateGroupFilter(toGroup); groupFilterTo.Add(toEntityID, toIndex); }