Unity new Input methods
Sun Aug 08 2021 20:46:52 GMT+0000 (UTC)
Saved by @thepapayaki #c#
1. Add 'Input System' via Package Manager 2. From Dialog, reboot with new Input System activated 3. Add new 'Input Actions' to project 4. Double-click it, and create new Actions (e.g. Fire, or Strafe). 'Button' for triggers. 'Value' for 1d or 2d axis. 5. On Player object, add new <PlayerInput> component. 6. Drag InputActions object into the 'Actions' spot on the new <PlayerInput> component 7. Keep Behavior to 'Send Messages' 8. Inside Player object's script .. add "using UnityEngine.InputSystem;" at top. 9. Inside Player object's script... use above code.
Comments