EcsRx / ecsrx

A reactive take on the ECS pattern for .net game developers
MIT License
520 stars 36 forks source link

Bug when implementing multiple IReactToDataSystem<T> #35

Closed Fijo closed 1 year ago

Fijo commented 2 years ago

I just noticed a bug when using more than one IReactToDataSystem on a single system.

Sadly to solve it properly it also requires changes to SystemsRx. So I went ahead and just created a unit test to demonstrate it for now.

That test could be shorter but I wanted it to be a somewhat proper one.

grofit commented 2 years ago

Will take a look tomorrow chief, thanks again for raising all this stuff, it may also effect other systems as I never really accounted for multiple of the same interface but its quite possible in some scenarios.

grofit commented 2 years ago

I have added a PR for this fix if you are happy to cast an eye over it before I approve it, the test passes now.

https://github.com/EcsRx/ecsrx/pull/36

grofit commented 1 year ago

This has been merged in now