pub fn release_on_input_map_removed<A: Actionlike>(
removed_components: RemovedComponents<'_, InputMap<A>>,
input_map_resource: Option<ResMut<'_, InputMap<A>>>,
action_state_resource: Option<ResMut<'_, ActionState<A>>>,
input_map_resource_existed: Local<'_, bool>,
action_state_query: Query<'_, '_, &mut ActionState<A>>
)Expand description
Release all inputs when an InputMap<A> is removed to prevent them from being held forever.
By default, [InputManagerPlugin<A>] will run this on CoreStage::PostUpdate.
For components you must remove the InputMap<A> before CoreStage::PostUpdate
or this will not run.