After adding a ButtonWithTwoModifiers in my InputActions asset, I get this error
InvalidOperationException: Cannot find public field ‘Modifier 1’ used as parameter of binding composite ‘UnityEngine.InputSystem.Composites.ButtonWithTwoModifiers’ of type ‘UnityEngine.InputSystem.Composites.ButtonWithTwoModifiers’
Same here: I googled the error message and arrived here, which fixed it for me. Thanks!
As an extra data point: I got into this situation by changing a 1-modifier binding to 2-modifier. The old binding was now used as modifier-2, so I swapped modifier-2 and binding.
Still happening with 1.7.0, and this time it happens with the TwoModifiersComposite
InvalidOperationException: Cannot find public field 'Modifier 1' used as parameter of binding composite 'UnityEngine.InputSystem.Composites.TwoModifiersComposite' of type 'UnityEngine.InputSystem.Composites.TwoModifiersComposite'
UnityEngine.InputSystem.InputBindingResolver.AssignCompositePartIndex (System.Object composite, System.String name, System.Int32& currentCompositePartCount) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputBindingResolver.cs:705)
UnityEngine.InputSystem.InputBindingResolver.AddActionMap (UnityEngine.InputSystem.InputActionMap actionMap) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Actions/InputBindingResolver.cs:387)
UnityEngine.InputSystem.InputSystem:AddDevice(String, String, String)