Reorder PickSet::Focus systems (#16791)

# Objective

- `PointerInteraction` components should be updated before sending
picking events. Otherwise they will be stale when event observers run.
- Allow inserting logic before picking events but after
`PointerInteraction` components have been updated.

## Solution

- Reorder systems in `PickSet::Focus`.
This commit is contained in:
UkoeHB 2024-12-13 12:55:22 -06:00 committed by GitHub
parent 00722b8d0f
commit 72079cf8e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ pub enum PickingInteraction {
None = 0,
}
/// Uses pointer events to update [`PointerInteraction`] and [`PickingInteraction`] components.
/// Uses [`HoverMap`] changes to update [`PointerInteraction`] and [`PickingInteraction`] components.
pub fn update_interactions(
// Input
hover_map: Res<HoverMap>,

View File

@ -414,7 +414,7 @@ impl Plugin for InteractionPlugin {
.add_event::<Pointer<Released>>()
.add_systems(
PreUpdate,
(update_focus, pointer_events, update_interactions)
(update_focus, update_interactions, pointer_events)
.chain()
.in_set(PickSet::Focus),
);