UI 자동화를 위해 바인딩 기능 구현
- 유니티 에셋 인증 오류로 meta 재생성
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22f5d28791afa30448b52589b9213066
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.DualShock;
|
||||
|
||||
public class LightbarSettings : MonoBehaviour
|
||||
{
|
||||
public Color SetColor;
|
||||
|
||||
public void ChangeColor()
|
||||
{
|
||||
var gamepad = DualShockGamepad.current;
|
||||
if (gamepad != null)
|
||||
{
|
||||
Debug.Log("Current gamepad: " + gamepad);
|
||||
gamepad.SetLightBarColor(SetColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f16c760d1d497144a1927cbb27caad8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbd4cc500f118d740a1342b2168f32e3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user