Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

observable_proxy

crates.io ci codecov license

The ProxyObservable can subscribe to another observable entity of matching type!

See Also

Example

cargo run -p rx_bevy --example observable_proxy_example
let keyboard_observable_entity = commands
    .spawn((
        Name::new("KeyboardObservable"),
        KeyboardObservable::new(default(), rx_schedule_update_virtual.handle())
            .into_component(),
    ))
    .id();

let _s = ProxyObservable::<KeyCode, Never>::new(
    keyboard_observable_entity,
    rx_schedule_update_virtual.handle(),
).subscribe(PrintObserver::new("proxy_observable"));