Advertisement
Megahertzs

PlayerInputSystem

Oct 24th, 2021
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.InputSystem;
  3.  
  4. public class PlayerInputSystem : MonoBehaviour
  5. {
  6.     public Vector2 movement;
  7.     public void OnMove(InputAction.CallbackContext context)
  8.     {
  9.         movement = context.ReadValue<Vector2>();
  10.     }
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement