Skip to content

Legion change events are fired for all mut queries #6

Closed
@cart

Description

@cart

Legion component change events / filters are fired whenever a system query contains Write<Component>. This makes these events useless for logic that needs to run when components are actually changed / as an optimization.

This might be solvable with some custom RefMut logic:

struct RefMut<T> {
  // other members
  modified: bool,
}

impl Deref for RefMut<T>
// on deref, set modified to true

// inside IntoSystem
query.iter(world) {
(a.fire(subscribers), b.fire(subscribers))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions