Is it possible to create persistent rebinding using C# generated script? Here is an example of code:
public class PlayerControls : MonoBehaviour
{
private Controls _controls;
void Awake()
{
_controls = new Controls();
_controls.Enable();
}
private void OnEnable()
{
_controls.Player.Jump.performed += DoJump;
}
private void OnDisable()
{
_controls.Player.Jump.performed -= DoJump;
}
private void DoJump(InputAction.CallbackContext value)
{
Debug.Log("Player jumps");
}
}
I use C# generated script and “Send Messages” option in the PlayerInput component. I want to rebind the button for the Jump action.
Any references or examples for this situation? I can only find persistent rebinding when not using C# generated script.
Also, I use version 1.3 of the Input System package.