diff --git a/Svelto.Common b/Svelto.Common index 314da96..9bedc53 160000 --- a/Svelto.Common +++ b/Svelto.Common @@ -1 +1 @@ -Subproject commit 314da96ee379dea24b0cefe1aba43c9e6e71eb23 +Subproject commit 9bedc53f794f771ac14d10751bbb61784251c3f7 diff --git a/Svelto.ECS/EnginesRoot.Submission.cs b/Svelto.ECS/EnginesRoot.Submission.cs index f91a5a8..1972459 100644 --- a/Svelto.ECS/EnginesRoot.Submission.cs +++ b/Svelto.ECS/EnginesRoot.Submission.cs @@ -43,6 +43,7 @@ namespace Svelto.ECS //are there new entities built to process? while ( _newEntitiesBuiltToProcess > 0) { + _newEntitiesBuiltToProcess = 0; //use other as source from now on //current will be use to write new entityViews _groupedEntityToAdd.Swap(); @@ -62,7 +63,6 @@ namespace Svelto.ECS if (numberOfReenteringLoops > 5) throw new Exception("possible infinite loop found creating Entities inside IEntityViewsEngine Add method, please consider building entities outside IEntityViewsEngine Add method"); - _newEntitiesBuiltToProcess = 0; numberOfReenteringLoops++; } }