jukibom / FlyDangerous

A love letter to the Elite Dangerous racing community ❤
https://store.steampowered.com/app/1781750/Fly_Dangerous/
GNU General Public License v3.0
272 stars 23 forks source link

`Clear All Bindings` breaks composite interactive rebind #243

Closed jukibom closed 1 year ago

jukibom commented 1 year ago

Because of some funky madness in the unity input system, composite button binds (e.g. single axis button binds, like pitch up or whatever) will fail to launch an interactive rebind.

ArgumentException: Expecting name at position 0 in '' Parameter name: text at UnityEngine.InputSystem.Utilities.NameAndParameters.ParseNameAndParameters (System.String text, System.Int32& index, System.Boolean nameOnly) [0x00072] in :0 at UnityEngine.InputSystem.Utilities.NameAndParameters.Parse (System.String text) [0x00010] in :0 at UnityEngine.InputSystem.InputBinding.GetNameOfComposite () [0x00010] in :0 at UnityEngine.InputSystem.InputActionRebindingExtensions+RebindingOperation.WithTargetBinding (System.Int32 bindingIndex) [0x00079] in :0 at UnityEngine.InputSystem.InputActionRebindingExtensions.PerformInteractiveRebinding (UnityEngine.InputSystem.InputAction action, System.Int32 bindingIndex) [0x000e7] in :0 at Menus.Options.RebindAction.PerformInteractiveRebind (UnityEngine.UI.Text bindingText, UnityEngine.InputSystem.InputAction action, System.Int32 bindingIndex, Menus.Options.BindingType bindingType, System.Boolean allCompositeParts) [0x000d9] in :0 at Menus.Options.RebindAction.StartInteractivePrimaryRebind () [0x0006f] in :0

What fun!