Search Unity

Feature Request LoadBindingOverridesFromJson should discard invalid bindings

Discussion in 'Input System' started by Windwalk_Rosco, Dec 13, 2022.

  1. Windwalk_Rosco

    Windwalk_Rosco

    Joined:
    Aug 10, 2020
    Posts:
    20
    Currently we are saving player binding overrides using
    SaveBindingOverridesAsJson()/
    LoadBindingOverridesFromJson(). We recently updated and removed an old action. This causes LoadBindingOverridesFromJson to throw an exception if an override to this old action was saved. This seems to cause a corruption to the action bindings as most controls become broken. I can work around this issue with a try/catch and reset any overrides if there is an exception but it would be much nicer if I didn't have to throw out all of a player's saved bindings if we decide to change the action layout.