EcsRx / ecsrx

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

improved error for incorrect component types #34

Closed Fijo closed 2 years ago

Fijo commented 2 years ago

I've been wanting to make this change for a very long time. Every once in a while I've accidentally put the wrong type in a group. This can easily happen when some component types are mostly wrappers around another type with the ability to change over time (aka using a ReactiveProperty or something similar).

In a few instances the resulting exception didn't make me realize the nature of my mistake right away. So I think this should be a good quality of life improvement for others as well, going forward.

grofit commented 2 years ago

Looks great and thanks for adding test coverage for this too, all this sort of stuff makes it far easier in the long run to verify no regression has occurred.