Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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.