Set up a toggle button using the Input Actions Manager
Set up a toggle button using the Input Actions Manager: derived from https://forum.unity.com/threads/new-input-system-how-to-use-the-hold-interaction.605587/
/********************************************************************** USE THIS AS A DEFAULT WAY OF SETTING UP A TOGGLE!!! ***********************************************************************/ if (controls.Gameplay.crouch.triggered) { isCrouching = !isCrouching; //toggle } //This will toggle 'crouch' on and off. Also make sure that the //controls.Gameplay.crouch.performed/cancelled IS NOT called in //Awake()