修复报错
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#if PICO_SDK || PXR_SDK
|
||||
using Unity.XR.PICO.TOBSupport;
|
||||
using Unity.XR.PXR;
|
||||
using UnityEngine;
|
||||
@@ -687,4 +688,67 @@ public class PicoAPI : MonoBehaviour
|
||||
#endregion
|
||||
|
||||
}
|
||||
#else
|
||||
using UnityEngine;
|
||||
|
||||
public class PicoAPI : MonoBehaviour
|
||||
{
|
||||
public static PicoAPI _Instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (_Instance == null)
|
||||
{
|
||||
_Instance = this;
|
||||
}
|
||||
}
|
||||
|
||||
public void AcquireWakeLock() { }
|
||||
public void TryRecenter() { }
|
||||
public void OpenTouPing() { }
|
||||
public void OpenApp(string pkgName) { }
|
||||
public void OpenWIFI() { }
|
||||
public void PlayPicoVideo(string fileName) { }
|
||||
public void AppKeepAlive(string appPackageName) { }
|
||||
public void SetAppAsHome(string pkgName) { }
|
||||
public void SetUSBConfigMode() { }
|
||||
public void KillAppsByPidOrPackageName(string pkgName) { }
|
||||
public void KillBackgroundAppsWithWhiteList(string pkgName) { }
|
||||
public void SetIpd(float ipd) { }
|
||||
public void OffBoundary() { }
|
||||
public int[] GetControllerBattery() { return new int[0]; }
|
||||
public void InstallApk(string path) { }
|
||||
public void UnInstallApp(string appPackageName) { }
|
||||
public string PicoSN() { return ""; }
|
||||
public string PicoPower() { return "0"; }
|
||||
public string ChargingStatus() { return ""; }
|
||||
public string PicoWIFIState() { return ""; }
|
||||
public void ShutDown() { }
|
||||
public void Reboot() { }
|
||||
public void SetHomeNoAvail() { }
|
||||
public void RemoveControllerHomeKey() { }
|
||||
public void OffSystemUpdateApp() { }
|
||||
public void OffSystemUpdate() { }
|
||||
public void OffNavgation() { }
|
||||
public void OffKillVRapp() { }
|
||||
public void OnPowerCtrlWIFIEnable() { }
|
||||
public void OffAppQuitConfirmDialog() { }
|
||||
public void OnSixDof() { }
|
||||
public void HandRecenter() { }
|
||||
public void HandHome() { }
|
||||
public void OnUSBDebugging() { }
|
||||
public void OffCastNotification() { }
|
||||
public void PICOCastSetShowAuthorization() { }
|
||||
public void CastOption() { }
|
||||
public string GetCastUrl() { return ""; }
|
||||
public void OpenSystemUpdateApp() { }
|
||||
public void OpenSystemUpdate() { }
|
||||
public void OpenNavgation() { }
|
||||
public void OpenKillVRapp() { }
|
||||
public void OpenAppQuitConfirmDialog() { }
|
||||
public void OpenHandRecenter() { }
|
||||
public void OpenHandHome() { }
|
||||
public void SetVolumeNum(int volume) { }
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.PXR;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR;
|
||||
|
||||
@@ -9,26 +8,10 @@ public class HandTakeObj : MonoBehaviour
|
||||
{
|
||||
bool isEnterObj;
|
||||
Transform goodTran;
|
||||
//public PXR_Input.Controller hand;
|
||||
XRNode xrNode;
|
||||
public XRNode xrNode = XRNode.LeftHand;
|
||||
public Transform goodParent;
|
||||
Good good;
|
||||
|
||||
void Start()
|
||||
{
|
||||
switch (hand)
|
||||
{
|
||||
case PXR_Input.Controller.LeftController:
|
||||
xrNode = XRNode.LeftHand;
|
||||
break;
|
||||
case PXR_Input.Controller.RightController:
|
||||
xrNode = XRNode.RightHand;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (isEnterObj)
|
||||
|
||||
Reference in New Issue
Block a user