unity new input system firing twice code example
Example: unity new input system performed twice
_playerControls.MainGameplay.Dialogs.performed +=
context =>
{
Debug.Log("Reads 1 when button pressed:" + context.ReadValue<float>());
if (context.ReadValueAsButton())
{
// performed is called twice.
// Once when ReadValueAsButton() is true (button down)
// And, once when it is false. (button up).
DoToggle();
}
};