Post by Admin on Jul 16, 2016 4:37:50 GMT
bleedingpixels @bleedingpixels Nov 27 2015 19:09
how does entitas handle scene switching?
Maxim Zaks @mzaks Nov 27 2015 19:12
Entitas itself is not connected to Unity, so it is up to you what you want to do on scene switch.
The Visual Debuging tool is based on Unity. However I am not sure about the behaviour there.
We (current project I working on) switched to additive scene loading and there for there is no scene switching
Maybe @sschmid can answer it better.
bleedingpixels @bleedingpixels Nov 27 2015 19:15
i was confused because i didn't want the controllers to be reinitialized on a scene change, but additive scene loading could be the fix . Thanks.
Simon Schmid @sschmid Nov 27 2015 19:44
Pools are not affected by scene changes. If you want to destroy a pool because of a scene change (e.g. switching from one level to another) you can call
pool.DestroyAllEntities();
systems.DeactivateReactiveSystems();
The VisualDebugging gameObject that represents the pool also survives scene changes
github.com/sschmid/Entitas-CSharp/blob/develop/Entitas.Unity.VisualDebugging/Assets/Tests/Generated/Pools.cs#L25
When you have sceneA with PoolA and you change to sceneB with PoolB, you’ll have both PoolA and PoolB
how does entitas handle scene switching?
Maxim Zaks @mzaks Nov 27 2015 19:12
Entitas itself is not connected to Unity, so it is up to you what you want to do on scene switch.
The Visual Debuging tool is based on Unity. However I am not sure about the behaviour there.
We (current project I working on) switched to additive scene loading and there for there is no scene switching
Maybe @sschmid can answer it better.
bleedingpixels @bleedingpixels Nov 27 2015 19:15
i was confused because i didn't want the controllers to be reinitialized on a scene change, but additive scene loading could be the fix . Thanks.
Simon Schmid @sschmid Nov 27 2015 19:44
Pools are not affected by scene changes. If you want to destroy a pool because of a scene change (e.g. switching from one level to another) you can call
pool.DestroyAllEntities();
systems.DeactivateReactiveSystems();
The VisualDebugging gameObject that represents the pool also survives scene changes
github.com/sschmid/Entitas-CSharp/blob/develop/Entitas.Unity.VisualDebugging/Assets/Tests/Generated/Pools.cs#L25
When you have sceneA with PoolA and you change to sceneB with PoolB, you’ll have both PoolA and PoolB