UI 자동화를 위해 바인딩 기능 구현

- 유니티 에셋 인증 오류로 meta 재생성
This commit is contained in:
2026-01-25 01:31:34 +09:00
parent 2ceb28f55d
commit ce83f21c93
1861 changed files with 377882 additions and 211 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.DualShock;
public class MotorSettings : MonoBehaviour
{
[Range(0, 1)] public float lowFrequencyMotorSpeed;
[Range(0, 1)] public float highFrequencyMotorSpeed;
public void SetMotorSpeeds()
{
var gamepad = Gamepad.current;
if (gamepad != null)
{
Debug.Log("Current gamepad: " + gamepad);
gamepad.SetMotorSpeeds(lowFrequencyMotorSpeed, highFrequencyMotorSpeed);
}
}
private void OnDisable()
{
var gamepad = Gamepad.current;
if (gamepad != null)
{
gamepad.SetMotorSpeeds(0, 0);
}
}
}