nevermore-kang's picture
Upload folder using huggingface_hub
18a519f verified
Raw
History Blame Contribute Delete
473 Bytes
using UnityEngine;
using UnityEngine.InputSystem;
public class ExampleDirect : MonoBehaviour
{
void Update()
{
var gamepad = Gamepad.current;
if (gamepad == null)
{
return; // No gamepad connected.
}
if (gamepad.rightTrigger.wasPressedThisFrame)
{
// 'Use' code here
}
Vector2 move = gamepad.leftStick.ReadValue();
{
// 'Move' code here
}
}
}