

To get input directly through an Input Action, follow these steps: Getting input indirectly through an Input Action The same approach works for other Device types (for example, Keyboard.current or Mouse.current). Public class MyPlayerScript : MonoBehaviour

For example, the following code gets the gamepad that a player last used, and reads its current state: using UnityEngine The quickest way to get started in script is to read the current state directly from Input Devices. Getting input directly from an Input Device
