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 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 PlayerInput OnBindingChanged Callback

Discussion in 'Input System' started by lejean, Jul 15, 2022.

  1. lejean


    Jul 4, 2013
    I'm updating my key rebinding system by using the rebinding example supplied in the Input samples.

    This works to an extent but I have a local co-op game, so I'm using the PlayerInput components.

    First I tried to add player separated logic to the RebindActionUI script in the sample, but it's quite the hassle.

    Then I noticed that playerInput has a onControlsChanged callback which I'm trying to work with now which might work better, but this is more of a global "something changed" event. So this would update everything that plugs in to it, even tho it wasn't necessarily changed.

    Isn't there some kind of onInputActionBindingChanged event in playerInput where I can just compare the assigned InputAction with the input action that changed and update only that UI accordingly.