上传YomovSDK

This commit is contained in:
Sora丶kong
2026-03-03 03:15:46 +08:00
parent 9096da7e6c
commit eb97f31065
6477 changed files with 1932208 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
using UnityEngine.UI;
using UnityEngine.InputSystem;
namespace UnityEngine.XR.OpenXR.Samples.ControllerSample
{
public class ActionToAxis : ActionToControl
{
[Tooltip("Slider controlled by the action value")]
[SerializeField] private Slider _slider = null;
protected override void OnActionPerformed(InputAction.CallbackContext ctx) => UpdateValue(ctx);
protected override void OnActionStarted(InputAction.CallbackContext ctx) => UpdateValue(ctx);
protected override void OnActionCanceled(InputAction.CallbackContext ctx) => UpdateValue(ctx);
private void UpdateValue(InputAction.CallbackContext ctx) => _slider.value = ctx.ReadValue<float>();
}
}