EcsRx / ecsrx

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

Collection isolation not enforced in observable groups #3

Closed grofit closed 6 years ago

grofit commented 6 years ago

When an observable group is created it can optionally be given a collection name to constrain on (incase you have multiple collections of entities).

The collection isolation is enforced at entity addition/removal events, but it is not enforced on component changes as it doesnt know the collection an entity is associated with, this was not too much of an issue before, but now we are bringing in excluded components in groups you need to be a bit more flexible with how you handle entity component interactions.

An idea is when a collection constraint is in place pass in the collection reference to the observable group, and subscribe directly on that to changes rather than globally.

grofit commented 6 years ago

This is fixed in the new version, as it isolates updates per collection.

grofit commented 6 years ago

Fixed in 0.2.0