Browse Source

Fix bug with entities created during the Add callback

tags/2.7
sebas77 6 years ago
parent
commit
ed99cbd820
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      Svelto.Common
  2. +1
    -1
      Svelto.ECS/EnginesRoot.Submission.cs

+ 1
- 1
Svelto.Common

@@ -1 +1 @@
Subproject commit 314da96ee379dea24b0cefe1aba43c9e6e71eb23
Subproject commit 9bedc53f794f771ac14d10751bbb61784251c3f7

+ 1
- 1
Svelto.ECS/EnginesRoot.Submission.cs View File

@@ -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++;
}
}


Loading…
Cancel
Save