修复报错

This commit is contained in:
Sora丶kong
2026-03-03 11:32:30 +08:00
parent 82130f6146
commit 2f0862b382
10 changed files with 125 additions and 81 deletions

View File

@@ -1,21 +1,22 @@
using System.Collections;
using System.Collections.Generic;
#if PICO_SDK || PXR_SDK
using Unity.XR.PXR;
using UnityEngine;
public class PXR_PicoHandPinchGesture : PicoHandDeviceDoEvent
{
public HandType handType;
private HandAimState aimState = new HandAimState();
private bool aimRayTouched = false;
private bool pinch = false;
public bool AimRayTouched { get => aimRayTouched; set => aimRayTouched = value; }
private bool pinch = false;
//private HandAimState aimState = new HandAimState();
public float PinchStrength { get; private set; }
public bool Pinch
{
get => pinch;
set {
set
{
if (pinch != value)
{
if (value)
@@ -31,7 +32,6 @@ public class PXR_PicoHandPinchGesture : PicoHandDeviceDoEvent
}
}
// Update is called once per frame
void Update()
{
UpdateAimState();
@@ -55,3 +55,10 @@ public class PXR_PicoHandPinchGesture : PicoHandDeviceDoEvent
}
}
}
#else
using UnityEngine;
public class PXR_PicoHandPinchGesture : PicoHandDeviceDoEvent
{
}
#endif