-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possible
Description
Currently there is not a way to mutate a component that has been provided to a QueryBorrow with the Added/Mutated/Changed series of structs that impl Query. These structs do not implement DerefMut, so there isn't a safe way to get a mutable reference to the component.
It was suggested in Discord that new writable change detection pointers could be the path forward on this, e.g.MutatedMut, ChangedMut, AddedMut` that would allow inner mutability of the value and track the changes made.
The work around I am using for this is are multiple component queries with mut versions of the components and entity comparisons, but it is a bit clunky - if there is a better work around that I'm missing, it would also be appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possible