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,31 @@
using System.ComponentModel;
using UnityEngine.InputSystem.LowLevel;
namespace UnityEngine.InputSystem.Processors
{
[DesignTimeVisible(false)]
internal class CompensateDirectionProcessor : InputProcessor<Vector3>
{
public override Vector3 Process(Vector3 value, InputControl control)
{
if (!InputSystem.settings.compensateForScreenOrientation)
return value;
var rotation = Quaternion.identity;
switch (InputRuntime.s_Instance.screenOrientation)
{
case ScreenOrientation.PortraitUpsideDown: rotation = Quaternion.Euler(0, 0, 180); break;
case ScreenOrientation.LandscapeLeft: rotation = Quaternion.Euler(0, 0, 90); break;
case ScreenOrientation.LandscapeRight: rotation = Quaternion.Euler(0, 0, 270); break;
}
return rotation * value;
}
public override string ToString()
{
return "CompensateDirection()";
}
public override CachingPolicy cachingPolicy => CachingPolicy.EvaluateOnEveryRead;
}
}