Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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