Search Unity

Feature Request Option for actions to reset state and notify when disabled

Discussion in 'Input System' started by Aristonaut, Aug 3, 2022.

  1. Aristonaut

    Aristonaut

    Joined:
    May 4, 2019
    Posts:
    15
    Actions currently have the option to do an initial state check. This will check state and fire events when the action is enabled. It would be nice to have a similar, inverse option for when actions are disabled.

    I propose adding a check box that would reset the state of the action and emit the proper events just before the action is disabled.

    This feature would allow flexibility with certain controls. Say you had a multiplayer game and wanted to open a little menu for players without pausing the game. The player's move action could be set to 'reset' when disabled, allowing you to simply switch action maps to stop the character from moving. No other state checks would really be needed.

    upload_2022-7-19_14-42-53.png