-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Trigger::components() does not return the expected results #17634
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Description
How can Bevy's documentation be improved?
The docs here mention that the trigger components will be
the components that triggered the observer, out of the
/// components defined in `B`
That is not the observed behaviour
world.spawn(
Observer::new(|trigger: Trigger<OnAdd, A>| {
dbg!(trigger.components());
})
);
let mut entity = world.spawn((A, B));
When the observer runs, the trigger.components() will contain the component ids for A and B.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-InvestigationThis issue requires detective work to figure out what's going wrongThis issue requires detective work to figure out what's going wrong
Type
Projects
Status
Observer overhaul