pub fn gamepad_connection_system(
    gamepads: ResMut<'_, Gamepads>,
    connection_events: EventReader<'_, '_, GamepadConnectionEvent>,
    axis: ResMut<'_, Axis<GamepadAxis>>,
    button_axis: ResMut<'_, Axis<GamepadButton>>,
    button_input: ResMut<'_, Input<GamepadButton>>
)
Expand description

Handles GamepadConnectionEvents and updates gamepad resources.

Updates the Gamepads resource and resets and/or initializes the Axis<GamepadButton> and Input<GamepadButton> resources.

Note

Whenever a Gamepad connects or disconnects, an information gets printed to the console using the info! macro.