Skip to content

Introduce mutable version of ChangedRes<> #598

@ropewalker

Description

@ropewalker

Currently if I want to a) execute a system only if a certain resource has been modified and b) to modify that resource in that system, I can do something like this:

pub fn my_system(
    _: ChangedRes<MyRes>,
    mut my_resource: ResMut<MyRes>,
) {
//...
}

It would be nice to be able to use just one parameter instead, like this:

pub fn my_system(
    mut my_resource: ChangedResMut<MyRes>,
) {
//...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions