Entitas-Redux
Entitas-Redux copied to clipboard
[BUG] DebugSystemsBehaviour shows wrong values for Update Systems if also reactive systems are present
Describe the bug When debugging the runtime of systems in inspector with DebugSystemsBehaviour. It shows the wrong values for the update systems.
Unity Version: Unity 2019.4.12f
To Reproduce
- create a new feature
- add an IReactiveSystem
- add an IUpdateSystem
- inspector show values of IUpdateSystem for IReactiveSystem
Expected behavior The values should be of the right systems.
Additional context The problem is that both system types will be added to _updateSystemInfos, but only IUpdateSystems will be added to _updateSystems. So there is an inconsistency between both lists. So why should it be handy to add IReactiveSystem to _updateSystemInfos?
If you want, I can create a PullRequest.
If you want, I can create a PullRequest.
Hi @TheHacky, if you'd like to fork the repo and create a test scene demonstrating this bug that will certainly make it easier for me to be able to respond to this issue! Thanks for asking.
Sorry for the late reply. I forked your repo and created a new branch (https://github.com/TheHacky/Entitas-Redux/tree/bug/visual_debug_bug). I added a new folder "Visual Debug Bug" in the "ExampleContent/Scenes". You will find two systems. One UpdateSystem and one ReactiveSystem. The UpdateSystem will sleep for 100ms each frame, but in visual debugging the duration will be shown for the ReactiveSystem.
As I already said it is an inconsistency between _updateSystems and _updateSystemInfos in DebugSystem.