Skip to main content

publish_pointer_state

Function publish_pointer_state 

Source
pub fn publish_pointer_state(
    state: Option<Res<'_, PointerState>>,
    modifiers: Option<Res<'_, ModifiersState>>,
)
Expand description

Publish what the input layer knows about the pointer each tick, so a read from a handler sees this tick’s position.

It reads only the pointer and modifier resources every input backend keeps, a window’s or a page’s, so every platform publishes through it.