上传修改
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "PICO.TobSupport",
|
||||
"references": [
|
||||
"Unity.XR.PICO.Editor",
|
||||
"Unity.XR.Interaction.Toolkit",
|
||||
"Unity.XR.PICO",
|
||||
"Unity.XR.OpenXR.Features.PICOSupport.Editor",
|
||||
"Unity.XR.OpenXR.Features.PICOSupport",
|
||||
"Unity.XR.OpenXR"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.xr.picoxr",
|
||||
"expression": "2.3.3",
|
||||
"define": "PICO_XR"
|
||||
},{
|
||||
"name": "com.unity.xr.interaction.toolkit",
|
||||
"expression": "2.4.0",
|
||||
"define": "XRI_240"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f34d393b8d26cb44d9a77c73186b30d0
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06c46620dce23a84db308dec9422b297
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efa7977e56d8ace45b2ca663a92b6306
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,100 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.PICO.TOBSupport;
|
||||
using Unity.XR.PXR;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class VirtualDisplayDemo : MonoBehaviour
|
||||
{
|
||||
private string tag = "VirtualDisplayDemo ----";
|
||||
private PXR_OverLay overlay = null;
|
||||
public Text mylog;
|
||||
private bool isBind = false;
|
||||
private int displayId = -1;
|
||||
|
||||
public const int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 16;
|
||||
public const int VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 8;
|
||||
public const int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 2;
|
||||
public const int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1;
|
||||
public const int VIRTUAL_DISPLAY_FLAG_SECURE = 4;
|
||||
public const int SOURCE_KEYBOARD = 257;
|
||||
public const int ACTION_DOWN = 0;
|
||||
public const int ACTION_UP = 1;
|
||||
public const int ACTION_MOVE = 2;
|
||||
int KEYCODE_BACK = 4;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
overlay = GetComponent<PXR_OverLay>();
|
||||
if (overlay == null)
|
||||
{
|
||||
Debug.LogError("PXRLog Overlay is null!");
|
||||
overlay = gameObject.AddComponent<PXR_OverLay>();
|
||||
}
|
||||
|
||||
overlay.isExternalAndroidSurface = true;
|
||||
PXR_Enterprise.InitEnterpriseService();
|
||||
}
|
||||
|
||||
public void showLog(string log)
|
||||
{
|
||||
Debug.Log(tag + log);
|
||||
mylog.text = log;
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
showLog("tobDemo:start");
|
||||
PXR_Enterprise.BindEnterpriseService(b =>
|
||||
{
|
||||
showLog("Bind绑定的返回值测试:" + b);
|
||||
isBind = true;
|
||||
|
||||
PXR_Enterprise.SwitchSystemFunction(
|
||||
(int)SystemFunctionSwitchEnum.SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG, (int)SwitchEnum.S_OFF,
|
||||
b =>
|
||||
{
|
||||
// showLog("SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG:" + b);
|
||||
});
|
||||
|
||||
int flags = VIRTUAL_DISPLAY_FLAG_PUBLIC;
|
||||
flags |= 1 << 6; //DisplayManager.VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH
|
||||
flags |= 1 << 7; //DisplayManager.VIRTUAL_DISPLAY_FLAG_ROTATES_WITH_CONTENT
|
||||
flags |= 1 << 8; //DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL
|
||||
flags |= VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
|
||||
|
||||
displayId = PXR_Enterprise.CreateVirtualDisplay("VirtualDisplayDemo", overlay.externalAndroidSurfaceObject,
|
||||
320, flags);
|
||||
showLog("CreateVirtualDisplay displayId:" + displayId);
|
||||
});
|
||||
}
|
||||
|
||||
public void OpenApp()
|
||||
{
|
||||
showLog("StartApp ret:");
|
||||
Intent m = new Intent();
|
||||
m.setComponent("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");
|
||||
int ret = PXR_Enterprise.StartApp(displayId, m);
|
||||
showLog("StartApp ret:" + ret);
|
||||
}
|
||||
|
||||
|
||||
public void ReleaseVirtualDisplay()
|
||||
{
|
||||
int ret = PXR_Enterprise.ReleaseVirtualDisplay(displayId);
|
||||
showLog("ReleaseVirtualDisplay ret:" + ret);
|
||||
}
|
||||
|
||||
public void InjectEvent(int action, float x, float y)
|
||||
{
|
||||
int ret = PXR_Enterprise.InjectEvent(displayId, action, SOURCE_KEYBOARD, x, y);
|
||||
}
|
||||
|
||||
public void bcak()
|
||||
{
|
||||
int ret = PXR_Enterprise.InjectEvent(displayId, ACTION_DOWN, SOURCE_KEYBOARD, KEYCODE_BACK);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f06b7308d86d8ad4b90e32cbc0dcdb2a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3435bd49e96ca5040baf62d3d31b65fd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,173 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.PXR;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.XR;
|
||||
|
||||
|
||||
public class VirtualDisplayEvent : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler,
|
||||
IInitializePotentialDragHandler
|
||||
{
|
||||
public string tag = "VirtualDisplayEvent----";
|
||||
public UnityEngine.XR.Interaction.Toolkit.Interactors.XRRayInteractor xrLeftRayInteractor;
|
||||
public UnityEngine.XR.Interaction.Toolkit.Interactors.XRRayInteractor xrRightRayInteractor;
|
||||
public VirtualDisplayDemo virtualDisplayController;
|
||||
public Text mylog;
|
||||
private UnityEngine.XR.Interaction.Toolkit.Interactors.XRRayInteractor currentRayInteractor;
|
||||
private GameObject mDisplay;
|
||||
private RectTransform mDisplayTran;
|
||||
private int mKeyEvent;
|
||||
private const int KEYEVENT_DEFAULT = -1;
|
||||
private const int KEYEVENT_DOWN = 0;
|
||||
private const int KEYEVENT_UP = 1;
|
||||
bool LeftState = false;
|
||||
private bool mLeftTriggerPressTemp = false;
|
||||
bool RightState = false;
|
||||
private bool mRightTriggerPressTemp = false;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
mDisplay = this.gameObject;
|
||||
mDisplayTran = mDisplay.GetComponent<RectTransform>();
|
||||
mKeyEvent = KEYEVENT_DEFAULT;
|
||||
currentRayInteractor = xrRightRayInteractor;
|
||||
}
|
||||
public void showLog(string log)
|
||||
{
|
||||
Debug.Log(tag + log);
|
||||
mylog.text = log;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.LeftHand).TryGetFeatureValue(PXR_Usages.controllerStatus, out LeftState);
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.RightHand)
|
||||
.TryGetFeatureValue(PXR_Usages.controllerStatus, out RightState);
|
||||
if (RightState)
|
||||
{
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.RightHand)
|
||||
.TryGetFeatureValue(CommonUsages.triggerButton, out mRightTriggerPressTemp);
|
||||
if (mRightTriggerPressTemp)
|
||||
{
|
||||
currentRayInteractor = xrRightRayInteractor;
|
||||
}
|
||||
}
|
||||
else if (LeftState)
|
||||
{
|
||||
InputDevices.GetDeviceAtXRNode(XRNode.LeftHand)
|
||||
.TryGetFeatureValue(CommonUsages.triggerButton, out mLeftTriggerPressTemp);
|
||||
if (mLeftTriggerPressTemp)
|
||||
{
|
||||
currentRayInteractor = xrLeftRayInteractor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mKeyEvent != KEYEVENT_DEFAULT)
|
||||
{
|
||||
DispatchMessageToAndroid(mKeyEvent, null);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
mKeyEvent = KEYEVENT_DOWN;
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData eventData)
|
||||
{
|
||||
mKeyEvent = KEYEVENT_UP;
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData eventData)
|
||||
{
|
||||
mKeyEvent = KEYEVENT_DOWN;
|
||||
}
|
||||
|
||||
public void OnInitializePotentialDrag(PointerEventData eventData)
|
||||
{
|
||||
eventData.useDragThreshold = false;
|
||||
}
|
||||
|
||||
private void DispatchMessageToAndroid(int actionType, PointerEventData eventData)
|
||||
{
|
||||
#if XRI_240
|
||||
Vector3 eventPoint = mDisplay.transform.InverseTransformPoint(currentRayInteractor.rayEndPoint);
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
InstrumentationInput(eventPoint, actionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
float x = (eventPoint.x + mDisplayTran.sizeDelta.x / 2) / mDisplayTran.sizeDelta.x;
|
||||
float y = (mDisplayTran.sizeDelta.y / 2 - eventPoint.y) / mDisplayTran.sizeDelta.y;
|
||||
mKeyEvent = KEYEVENT_DEFAULT;
|
||||
Debug.Log(actionType + "--->" + x + ", " + y + ", " + eventPoint.x + ", " + eventPoint.y);
|
||||
}
|
||||
#else
|
||||
showLog("com.unity.xr.interaction.toolkit Version needs to be greater than 2.3.x");
|
||||
// Debug.LogError("com.unity.xr.interaction.toolkit Version needs to be greater than 2.3.x");
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool mIsUp = true;
|
||||
private float mLastX, mLastY;
|
||||
|
||||
private void InstrumentationInput(Vector3 eventPoint, int actionType)
|
||||
{
|
||||
|
||||
float eventX = eventPoint.x;
|
||||
float eventY = eventPoint.y;
|
||||
float x = (eventX + mDisplayTran.sizeDelta.x / 2) / mDisplayTran.sizeDelta.x;
|
||||
float y = (mDisplayTran.sizeDelta.y / 2 - eventY) / mDisplayTran.sizeDelta.y;
|
||||
|
||||
if (mIsUp && (eventX == 0.0f || eventY == 0.0f || x > 0.99f || x < 0.01f || y > 0.99f || y < 0.01f))
|
||||
{
|
||||
//处理在屏幕外操作的问题
|
||||
showLog("input--->out of the screen---1");
|
||||
mKeyEvent = KEYEVENT_DEFAULT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (actionType == KEYEVENT_DOWN)
|
||||
{
|
||||
if (mIsUp)
|
||||
{
|
||||
mIsUp = false;
|
||||
virtualDisplayController.InjectEvent(VirtualDisplayDemo.ACTION_DOWN,x,y);
|
||||
showLog("down--->" + x + ", " + y + ", " + eventX + ", " + eventY);
|
||||
}
|
||||
|
||||
if (!mIsUp)
|
||||
{
|
||||
if (eventX == 0.0f || eventY == 0.0f || x > 0.99f || x < 0.01f || y > 0.99f || y < 0.01f)
|
||||
{
|
||||
//处理划出屏幕,还未抬起的问题
|
||||
showLog("input--->out of the screen---2");
|
||||
mIsUp = true;
|
||||
mKeyEvent = KEYEVENT_DEFAULT;
|
||||
virtualDisplayController.InjectEvent(VirtualDisplayDemo.ACTION_UP,x,y);
|
||||
showLog("up--->" + mLastX + ", " + mLastY + ", " + eventX + ", " + eventY);
|
||||
}
|
||||
else
|
||||
{
|
||||
virtualDisplayController.InjectEvent(VirtualDisplayDemo.ACTION_MOVE,x,y);
|
||||
showLog("move--->" + x + ", " + y + ", " + eventX + ", " + eventY);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (actionType == KEYEVENT_UP)
|
||||
{
|
||||
mIsUp = true;
|
||||
mKeyEvent = KEYEVENT_DEFAULT;
|
||||
virtualDisplayController.InjectEvent(VirtualDisplayDemo.ACTION_UP,x,y);
|
||||
showLog("up--->" + x + ", " + y + ", " + eventPoint.x + ", " + eventPoint.y);
|
||||
}
|
||||
|
||||
mLastX = x;
|
||||
mLastY = y;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08f33d7dda159e143969c80188c1203f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d50237881bc77e4087171150691c3a1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 865e330f2b0cd4141ab4a4153d535675
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum ControllerKeyEnum
|
||||
{
|
||||
CONTROLLER_KEY_JOYSTICK=0,
|
||||
CONTROLLER_KEY_MENU=1,
|
||||
CONTROLLER_KEY_TRIGGER=2,
|
||||
CONTROLLER_KEY_RIGHT_A=3,
|
||||
CONTROLLER_KEY_RIGHT_B=4,
|
||||
CONTROLLER_KEY_LEFT_X=5,
|
||||
CONTROLLER_KEY_LEFT_Y=6,
|
||||
CONTROLLER_KEY_LEFT_GRIP=7,
|
||||
CONTROLLER_KEY_RIGHT_GRIP=8,
|
||||
CONTROLLER_KEY_VOLUME_DOWN=9,
|
||||
CONTROLLER_KEY_VOLUME_UP=10,
|
||||
CONTROLLER_KEY_CLICK=11
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71820ab70affcbd4faa8707df25e1725
|
||||
timeCreated: 1685945465
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum ControllerPairTimeEnum
|
||||
{
|
||||
DEFAULT=0,
|
||||
FIFTEEN=15,
|
||||
SIXTY=60,
|
||||
ONE_HUNDRED_AND_TWENTY=120,
|
||||
SIX_HUNDRED=600,
|
||||
NEVER=-1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88ffdfff23fd922469ae84af0a209731
|
||||
timeCreated: 1685943806
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum CustomizeSettingsTabEnum
|
||||
{
|
||||
CUSTOMIZE_SETTINGS_TAB_WLAN = 0,
|
||||
CUSTOMIZE_SETTINGS_TAB_CONTROLLER = 1,
|
||||
CUSTOMIZE_SETTINGS_TAB_BLUETOOTH = 2,
|
||||
CUSTOMIZE_SETTINGS_TAB_DISPLAY = 3,
|
||||
CUSTOMIZE_SETTINGS_TAB_LAB = 4,
|
||||
CUSTOMIZE_SETTINGS_TAB_GENERAL_LOCKSCREEN = 5,
|
||||
CUSTOMIZE_SETTINGS_TAB_GENERAL_FACTORY_RESET = 6
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2714615e3a23d9449fdf19cdf584b48
|
||||
timeCreated: 1685945379
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum DeviceControlEnum
|
||||
{
|
||||
DEVICE_CONTROL_REBOOT=0,
|
||||
DEVICE_CONTROL_SHUTDOWN=1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cfd7333ed47ab44a874e4fe98c1c08d
|
||||
timeCreated: 1685937183
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum HomeEventEnum
|
||||
{
|
||||
SINGLE_CLICK=0,
|
||||
DOUBLE_CLICK=1,
|
||||
LONG_PRESS=2,
|
||||
SINGLE_CLICK_RIGHT_CTL=3,
|
||||
DOUBLE_CLICK_RIGHT_CTL=4,
|
||||
LONG_PRESS_RIGHT_CTL=5,
|
||||
SINGLE_CLICK_LEFT_CTL=6,
|
||||
DOUBLE_CLICK_LEFT_CTL=7,
|
||||
LONG_PRESS_LEFT_CTL=8,
|
||||
SINGLE_CLICK_HMD=9,
|
||||
DOUBLE_CLICK_HMD=10,
|
||||
LONG_PRESS_HMD=11
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 599cdfc907c46d6488436b1622eafd50
|
||||
timeCreated: 1685937306
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum HomeFunctionEnum
|
||||
{
|
||||
VALUE_HOME_GO_TO_SETTING=0,
|
||||
VALUE_HOME_BACK=1,
|
||||
VALUE_HOME_RECENTER=2,
|
||||
VALUE_HOME_OPEN_APP=3,
|
||||
VALUE_HOME_DISABLE=4,
|
||||
VALUE_HOME_GO_TO_HOME=5,
|
||||
VALUE_HOME_SEND_BROADCAST=6,
|
||||
VALUE_HOME_CLEAN_MEMORY=7,
|
||||
VALUE_HOME_QUICK_SETTING=8,
|
||||
VALUE_HOME_SCREEN_CAP=9,
|
||||
VALUE_HOME_SCREEN_RECORD=10
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6effac1077bec9348aaf4f68c8787e7f
|
||||
timeCreated: 1685937603
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum OnLineSystemUpdateStatusCode
|
||||
{
|
||||
IDLE = 0,
|
||||
CHECKING_FOR_UPDATE = 1,
|
||||
UPDATE_AVAILABLE = 2,
|
||||
|
||||
DOWNLOADING = 3,
|
||||
DOWNLOAD_FINISH = 4,
|
||||
|
||||
UPGRADE_EXTRACTING = 5,
|
||||
UPGRADE_VERIFYING = 6,
|
||||
UPGRADE_WAITING_REBOOT = 7,
|
||||
UPGRADE_FINISH = 8,
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4987722c5bd8ae64bbf7ad10872e5438
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum OnlineSystemUpdateErrorCode
|
||||
{
|
||||
SUCCESS = 0,
|
||||
ERROR = -1,
|
||||
UPDATE_NOT_AVAILABLE = -3,
|
||||
CHECK_UPDATE_ERROR = -4,
|
||||
DOWNLOAD_ERROR = -5,
|
||||
DOWNLOAD_VERIFY_ERROR = -6,
|
||||
UPGRADE_ERROR = -7
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6030323398821e2418c759216d56eb0b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PICOCastOptionOrStatusEnum
|
||||
{
|
||||
OPTION_RESOLUTION_LEVEL=0,
|
||||
OPTION_BITRATE_LEVEL=1,
|
||||
OPTION_AUDIO_ENABLE=2,
|
||||
PICO_CAST_STATUS=3
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aab97c5d20f1fe940beb18a3fe308e46
|
||||
timeCreated: 1685945051
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PICOCastOptionValueEnum
|
||||
{
|
||||
OPTION_VALUE_RESOLUTION_HIGH,
|
||||
OPTION_VALUE_RESOLUTION_MIDDLE,
|
||||
OPTION_VALUE_RESOLUTION_AUTO,
|
||||
OPTION_VALUE_RESOLUTION_HIGH_2K,
|
||||
OPTION_VALUE_RESOLUTION_HIGH_4K,
|
||||
|
||||
OPTION_VALUE_BITRATE_HIGH,
|
||||
OPTION_VALUE_BITRATE_MIDDLE,
|
||||
OPTION_VALUE_BITRATE_LOW,
|
||||
|
||||
OPTION_VALUE_AUDIO_ON,
|
||||
OPTION_VALUE_AUDIO_OFF,
|
||||
|
||||
STATUS_VALUE_STATE_STARTED,
|
||||
STATUS_VALUE_STATE_STOPPED,
|
||||
STATUS_VALUE_ERROR
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1de348b2dfe662e4b9053c101bbda4fa
|
||||
timeCreated: 1685945106
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PICOCastUrlTypeEnum
|
||||
{
|
||||
NORMAL_URL=0,
|
||||
NO_CONFIRM_URL=1,
|
||||
RTMP_URL=2
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d04bb6dfca248143bdd812fb00ea7b2
|
||||
timeCreated: 1685944504
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PackageControlEnum
|
||||
{
|
||||
PACKAGE_SILENCE_INSTALL=0,
|
||||
PACKAGE_SILENCE_UNINSTALL=1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9508b93fb3d76f49ae71ad9e3d679f9
|
||||
timeCreated: 1685937232
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class PicoCastMediaFormat
|
||||
{
|
||||
public int bitrate = -1;//kb
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8eca65ab8e7e4984a8415528a35a2f3d
|
||||
timeCreated: 1686223794
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PoseErrorType
|
||||
{
|
||||
BRIGHT_LIGHT_ERROR = (1 << 0),
|
||||
LOW_LIGHT_ERROR = (1 << 1),
|
||||
LOW_FEATURE_COUNT_ERROR = (1 << 2),
|
||||
CAMERA_CALIBRATION_ERROR = (1 << 3),
|
||||
RELOCATION_IN_PROGRESS = (1 << 4),
|
||||
INITILIZATION_IN_PROGRESS = (1 << 5),
|
||||
NO_CAMERA_ERROR = (1 << 6),
|
||||
NO_IMU_ERROR = (1 << 7),
|
||||
IMU_JITTER_ERROR = (1 << 8),
|
||||
UNKNOWN_ERROR = (1 << 9)
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46bdaa338aeb42e4c813168706e540f3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum PowerOnOffLogoEnum
|
||||
{
|
||||
PLPowerOnLogo=0,
|
||||
PLPowerOnAnimation=1,
|
||||
PLPowerOffAnimation=2
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7e0adfb5b4e8e342ad0fa15263e54ca
|
||||
timeCreated: 1685945676
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum ScreenOffDelayTimeEnum
|
||||
{
|
||||
THREE,
|
||||
TEN ,
|
||||
THIRTY ,
|
||||
SIXTY,
|
||||
THREE_HUNDRED,
|
||||
SIX_HUNDRED ,
|
||||
NEVER
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22e9ab23329ae354097af770cf179472
|
||||
timeCreated: 1685943725
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum ScreencastAudioOutputEnum
|
||||
{
|
||||
AUDIO_ERROR=0,
|
||||
AUDIO_SINK = 1,
|
||||
AUDIO_TARGET = 2,
|
||||
AUDIO_SINK_TARGET = 3,
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d484897b4d6e06b4281b6e25e222c723
|
||||
timeCreated: 1685945230
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum SleepDelayTimeEnum
|
||||
{
|
||||
FIFTEEN ,
|
||||
THIRTY ,
|
||||
SIXTY ,
|
||||
THREE_HUNDRED ,
|
||||
SIX_HUNDRED ,
|
||||
ONE_THOUSAND_AND_EIGHT_HUNDRED ,
|
||||
NEVER
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca0a63d4310322847a9569df3fb34d4a
|
||||
timeCreated: 1685943762
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum StartVRSettingsEnum
|
||||
{
|
||||
START_VR_SETTINGS_ITEM_WIFI=0,
|
||||
START_VR_SETTINGS_ITEM_BLUETOOTH=1,
|
||||
START_VR_SETTINGS_ITEM_CONTROLLER=2,
|
||||
START_VR_SETTINGS_ITEM_LAB=3,
|
||||
START_VR_SETTINGS_ITEM_BRIGHTNESS=4,
|
||||
START_VR_SETTINGS_ITEM_GENERAL=5,
|
||||
START_VR_SETTINGS_ITEM_NOTIFICATION=6
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47b4eb0018f80d5428bed27d2e7f69bf
|
||||
timeCreated: 1685944404
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum SwitchEnum
|
||||
{
|
||||
S_ON=0,
|
||||
S_OFF=1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef3b88f2e4c726543b34bbb0f0aca35f
|
||||
timeCreated: 1685937261
|
||||
@@ -1,322 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum SystemFunctionSwitchEnum
|
||||
{
|
||||
//USB调试开关
|
||||
SFS_USB = 0,
|
||||
|
||||
//自动休眠开关
|
||||
SFS_AUTOSLEEP = 1,
|
||||
|
||||
//亮屏充电开关
|
||||
SFS_SCREENON_CHARGING = 2,
|
||||
|
||||
//OTG充电开关(仅G2系列有)
|
||||
SFS_OTG_CHARGING = 3,
|
||||
|
||||
//2D界面下返回图标显示开关(仅G2系列有)
|
||||
SFS_RETURN_MENU_IN_2DMODE = 4,
|
||||
|
||||
//组合键开关
|
||||
SFS_COMBINATION_KEY = 5,
|
||||
|
||||
//开机校准开关(仅G2系列有)
|
||||
SFS_CALIBRATION_WITH_POWER_ON = 6,
|
||||
|
||||
//升级更新开关
|
||||
SFS_SYSTEM_UPDATE = 7,
|
||||
|
||||
//手机投屏开关
|
||||
//只支持PUI4.X
|
||||
SFS_CAST_SERVICE = 8,
|
||||
|
||||
//护眼模式开关
|
||||
SFS_EYE_PROTECTION = 9,
|
||||
|
||||
// 6Dof安全区永久关闭开关
|
||||
SFS_SECURITY_ZONE_PERMANENTLY = 10,
|
||||
|
||||
//全局校准开关(仅3dof模式支持)
|
||||
SFS_GLOBAL_CALIBRATION = 11,
|
||||
|
||||
//自动校准
|
||||
[Obsolete]
|
||||
SFS_Auto_Calibration = 12,
|
||||
|
||||
//USB插入启动
|
||||
SFS_USB_BOOT = 13,
|
||||
|
||||
//音量全局UI提示开关
|
||||
SFS_VOLUME_UI = 14,
|
||||
|
||||
//手柄连接全局UI提示开关
|
||||
SFS_CONTROLLER_UI = 15,
|
||||
|
||||
//打开/关闭导航栏的接口
|
||||
SFS_NAVGATION_SWITCH = 16,
|
||||
|
||||
//是否显示录屏按钮
|
||||
SFS_SHORTCUT_SHOW_RECORD_UI = 17,
|
||||
|
||||
//打开/关闭运动UI
|
||||
//Neo3 Pro PUI4.x支持
|
||||
SFS_SHORTCUT_SHOW_FIT_UI = 18,
|
||||
|
||||
//是否显示投屏按钮
|
||||
SFS_SHORTCUT_SHOW_CAST_UI = 19,
|
||||
|
||||
//是否显示截屏按钮
|
||||
SFS_SHORTCUT_SHOW_CAPTURE_UI = 20,
|
||||
|
||||
//2D应用杀活开关
|
||||
[Obsolete]
|
||||
SFS_STOP_MEM_INFO_SERVICE = 21,
|
||||
|
||||
//限制APP自启动开关
|
||||
[Obsolete]
|
||||
SFS_START_APP_BOOT_COMPLETED = 22,
|
||||
|
||||
//设备设置为host设备
|
||||
SFS_USB_FORCE_HOST = 23,
|
||||
|
||||
//Neo3、PICO4系列设备设置快速安全区
|
||||
SFS_SET_DEFAULT_SAFETY_ZONE = 24,
|
||||
|
||||
//Neo3 PICO4系列设备可重新自定义安全区
|
||||
SFS_ALLOW_RESET_BOUNDARY = 25,
|
||||
|
||||
//Neo3、PICO4系列设备安全区是否显示确认界面
|
||||
SFS_BOUNDARY_CONFIRMATION_SCREEN = 26,
|
||||
|
||||
//Neo3、PICO4系列设备长按Home键校准
|
||||
SFS_LONG_PRESS_HOME_TO_RECENTER = 27,
|
||||
|
||||
//灭屏后设备保持网络连接
|
||||
//PICO4 E【PUI5.4.0及以上】
|
||||
//PICO G3【PUI5.4.0及以上】
|
||||
//Neo3 Pro【PUI4.8.0&4.8.1及以上】
|
||||
SFS_POWER_CTRL_WIFI_ENABLE = 28,
|
||||
|
||||
//禁用wifi
|
||||
//PICO4 E【PUI5.4.0及以上】
|
||||
//PICO G3【PUI5.4.0及以上】
|
||||
//Neo3 Pro【PUI4.8.0&4.8.1及以上】
|
||||
SFS_WIFI_DISABLE = 29,
|
||||
|
||||
//Neo3、PICO4系列设备6Dof开关
|
||||
SFS_SIX_DOF_SWITCH = 30,
|
||||
|
||||
//反色散开关
|
||||
//PICO Neo3、G3
|
||||
SFS_INVERSE_DISPERSION = 31,
|
||||
|
||||
//switch logcat , path: data/logs
|
||||
SFS_LOGCAT = 32,
|
||||
|
||||
//switch psensor
|
||||
SFS_PSENSOR = 33,
|
||||
|
||||
//OTA升级开关
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SYSTEM_UPDATE_OTA = 34,
|
||||
|
||||
//应用升级更新开关
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SYSTEM_UPDATE_APP = 35,
|
||||
|
||||
//快捷设置是否显示WLAN按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SHORTCUT_SHOW_WLAN_UI = 36,
|
||||
|
||||
//快捷设置是否显示安全区按钮
|
||||
//PICO4E & Neo3Pro 【PUI5.4.0】
|
||||
SFS_SHORTCUT_SHOW_BOUNDARY_UI = 37,
|
||||
|
||||
//快捷设置是否显示蓝牙按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SHORTCUT_SHOW_BLUETOOTH_UI = 38,
|
||||
|
||||
//快捷设置是否显示一键清理按钮
|
||||
//【PUI5.4.0】
|
||||
SFS_SHORTCUT_SHOW_CLEAN_TASK_UI = 39,
|
||||
|
||||
//快捷设置是否显示瞳距调节按钮
|
||||
//PICO4E【PUI5.4.0】
|
||||
SFS_SHORTCUT_SHOW_IPD_ADJUSTMENT_UI = 40,
|
||||
|
||||
//快捷设置是否显示关机/重启按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SHORTCUT_SHOW_POWER_UI = 41,
|
||||
|
||||
//快捷设置是否显示编辑按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_SHORTCUT_SHOW_EDIT_UI = 42,
|
||||
|
||||
//行业设置-基础设置-自定义资源按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_BASIC_SETTING_APP_LIBRARY_UI = 43,
|
||||
|
||||
//行业设置-基础设置-自定义快捷设置按钮
|
||||
//【PUI5.4.0 以上】
|
||||
SFS_BASIC_SETTING_SHORTCUT_UI = 44,
|
||||
|
||||
//LED 指示灯灭屏并且电量小于20%时是否亮
|
||||
//PICO G3
|
||||
SFS_LED_FLASHING_WHEN_SCREEN_OFF = 45,
|
||||
|
||||
//基础设置中自定义设置条目的显示隐藏
|
||||
SFS_BASIC_SETTING_CUSTOMIZE_SETTING_UI = 46,
|
||||
|
||||
//--------------以下开关上线版本详见更新历史-----------------
|
||||
|
||||
//app 切换是否显示退出对话框
|
||||
SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG = 47,
|
||||
|
||||
//是否查杀后台VR的应用,1杀,当设置为2时,不杀,默认为杀
|
||||
SFS_BASIC_SETTING_KILL_BACKGROUND_VR_APP = 48,
|
||||
|
||||
//是否显示投屏时的一个蓝色图标,默认显示,当设置为0时,隐藏蓝色图标
|
||||
SFS_BASIC_SETTING_SHOW_CAST_NOTIFICATION = 49,
|
||||
|
||||
//自动IPD开关
|
||||
//PICO 4E
|
||||
SFS_AUTOMATIC_IPD = 50,
|
||||
|
||||
//快速透视模式开关
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版【PUI 5.7.0】
|
||||
SFS_QUICK_SEETHROUGH_MODE = 51,
|
||||
|
||||
//高刷新率模式开关
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版【PUI 5.7.0】
|
||||
SFS_HIGN_REFERSH_MODE = 52,
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版 & G3【PUI 5.8.0】
|
||||
//透视模式下应用是否正常运行开关
|
||||
SFS_SEETHROUGH_APP_KEEP_RUNNING = 53,
|
||||
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版【PUI 5.8.0】
|
||||
//户外环境跟踪定位优化
|
||||
SFS_OUTDOOR_TRACKING_ENHANCEMENT = 54,
|
||||
|
||||
//PICO 4E【PUI 5.8.0】
|
||||
//快捷IPD
|
||||
SFS_AUTOIPD_AUTO_COMFIRM = 55,
|
||||
|
||||
//PICO 4E【PUI 5.8.0】
|
||||
//佩戴头戴是否启动自动IPD
|
||||
SFS_LAUNCH_AUTOIPD_IF_GLASSES_WEARED = 56,
|
||||
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版【PUI 5.8.0】
|
||||
//HOME手势开关
|
||||
SFS_GESTURE_RECOGNITION_HOME_ENABLE = 57,
|
||||
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版【PUI 5.8.0】
|
||||
//RESET手势开关
|
||||
SFS_GESTURE_RECOGNITION_RESET_ENABLE = 58,
|
||||
|
||||
//PICO Neo3 Pro & PICO 4E & Neo3 企业版 & G3【PUI 5.8.0】
|
||||
//OTG 资源自动导入
|
||||
SFS_AUTO_COPY_FILES_FROM_USB_DEVICE = 59,
|
||||
|
||||
//WIFI直连-任何设备都可静默连接,无需弹窗
|
||||
SFS_WIFI_P2P_AUTO_CONNECT = 60,
|
||||
|
||||
//锁屏状态下文件拷贝开关
|
||||
SFS_LOCK_SCREEN_FILE_COPY_ENABLE = 61,
|
||||
|
||||
//动态marker检测开关
|
||||
SFS_TRACKING_ENABLE_DYNAMIC_MARKER = 62,
|
||||
|
||||
//手柄3/6 dof模式切换
|
||||
SFS_ENABLE_3DOF_CONTROLLER_TRACKING = 63,
|
||||
|
||||
//手柄震动反馈 PUI560开始支持
|
||||
SFS_SYSTEM_VIBRATION_ENABLED = 64,
|
||||
|
||||
//蓝牙开关
|
||||
SFS_BLUE_TOOTH = 65,
|
||||
|
||||
//视频画质增强 PUI580开始支持
|
||||
SFS_ENHANCED_VIDEO_QUALITY = 66,
|
||||
|
||||
//手势识别(追踪) PUI560开始支持
|
||||
SFS_GESTURE_RECOGNITION = 67,
|
||||
|
||||
//亮度自适应 PUI560开始支持
|
||||
SFS_BRIGHTNESS_AUTO_ADJUST = 68,
|
||||
|
||||
//大电流OTG模式 PUI580开始支持
|
||||
SFS_HIGH_CURRENT_OTG_MODE = 69,
|
||||
|
||||
//禁止后台应用播放音频 PUI560开始支持
|
||||
SFS_BACKGROUND_APP_PLAY_AUDIO = 70,
|
||||
|
||||
//勿扰模式 PUI560开始支持
|
||||
SFS_NO_DISTURB_MODE = 71,
|
||||
|
||||
//单目投屏 PUI570开始支持
|
||||
SFS_MONOCULAR_SCREENCAST = 72,
|
||||
|
||||
//单目截录屏 PUI570开始支持
|
||||
SFS_MONOCULAR_SCREEN_CAPTURE = 73,
|
||||
|
||||
//减少录屏画面抖动 PUI570开始支持
|
||||
SFS_STABILIZATION_FOR_RECORDING = 74,
|
||||
|
||||
//主屏幕应用为VR应用时,回launcher收起2D应用开关接口
|
||||
SFS_HIDE_2D_APP_WHEN_GO_TO_HOME = 75,
|
||||
|
||||
//手柄振动开关
|
||||
SFS_CONTROLLER_VIBRATE = 76,
|
||||
|
||||
//刷新模式开关
|
||||
SFS_REFRESH_MODE = 77,
|
||||
|
||||
//智能音效开关
|
||||
SFS_SMART_AUDIO = 78,
|
||||
|
||||
//视线追踪开关
|
||||
SFS_EYE_TRACK = 79,
|
||||
|
||||
//表情模拟开关
|
||||
SFS_FACE_SIMULATE = 80,
|
||||
|
||||
//录屏时启用麦克风开关
|
||||
SFS_ENABLE_MIC_WHEN_RECORD = 81,
|
||||
|
||||
//熄屏后继续录屏开关
|
||||
SFS_KEEP_RECORD_WHEN_SCREEN_OFF = 82,
|
||||
|
||||
//安全边界中,手柄振动提醒开关
|
||||
SFS_CONTROLLER_TIP_VIBRATE = 83,
|
||||
|
||||
//安全边界中,手柄触发透视开关
|
||||
SFS_CONTROLLER_SEE_THROUGH = 84,
|
||||
|
||||
//安全边界中,原地边界降低高度开关
|
||||
SFS_LOW_BORDER_HEIGHT = 85,
|
||||
|
||||
//安全边界中,快速移动安全提示开关
|
||||
SFS_FAST_MOVE_TIP = 86,
|
||||
|
||||
//开启无线USB调试开关
|
||||
SFS_WIRELESS_USB_ADB = 87,
|
||||
|
||||
//系统自动更新
|
||||
SFS_SYSTEM_AUTO_UPDATE = 88,
|
||||
|
||||
//usb共享网络开关
|
||||
SFS_USB_TETHERING = 89,
|
||||
|
||||
/**
|
||||
* VR应用中实时响应头戴返回键
|
||||
* 开关打开:头戴返回键按下发出DOWN事件,抬起发出UP事件
|
||||
* 开关关闭:头戴返回键按下不发出DOWN事件,抬起同时发出DOWN/UP事件
|
||||
*/
|
||||
SFS_REAL_TIME_RESPONSE_HMD_BACK_KEY_IN_VR_APP = 90,
|
||||
|
||||
//优先使用Marker点找回地图
|
||||
SFS_RETRIEVE_MAP_BY_MARKER_FIRST = 91
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d478586fa3b0236429ce81bab6f48957
|
||||
timeCreated: 1685943877
|
||||
@@ -1,66 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum SystemInfoEnum
|
||||
{
|
||||
//电量查看
|
||||
ELECTRIC_QUANTITY = 0,
|
||||
|
||||
//PUI版本号查看
|
||||
PUI_VERSION = 1,
|
||||
|
||||
//设备型号查看
|
||||
EQUIPMENT_MODEL = 2,
|
||||
|
||||
// 设备SN查看
|
||||
EQUIPMENT_SN = 3,
|
||||
|
||||
// 客户SN查看
|
||||
CUSTOMER_SN = 4,
|
||||
|
||||
// 设备内部存储空间查看
|
||||
INTERNAL_STORAGE_SPACE_OF_THE_DEVICE = 5,
|
||||
|
||||
// 设备蓝牙状态查看
|
||||
DEVICE_BLUETOOTH_STATUS = 6,
|
||||
|
||||
// 已连接蓝牙名称查看
|
||||
BLUETOOTH_NAME_CONNECTED = 7,
|
||||
|
||||
// 蓝牙MAC地址查看
|
||||
BLUETOOTH_MAC_ADDRESS = 8,
|
||||
|
||||
// 设备WiFi状态查看
|
||||
DEVICE_WIFI_STATUS = 9,
|
||||
|
||||
// 已连接WiFi名称查看
|
||||
WIFI_NAME_CONNECTED = 10,
|
||||
|
||||
// WLAN MAC地址查看
|
||||
WLAN_MAC_ADDRESS = 11,
|
||||
|
||||
// 设备IP查看
|
||||
DEVICE_IP = 12,
|
||||
|
||||
// 设备是否充电
|
||||
CHARGING_STATUS = 13,
|
||||
|
||||
//Neo3设备新旧Key
|
||||
DEVICE_KEY = 14,
|
||||
|
||||
//设备本身蓝牙信息
|
||||
//返回值格式:Name|Address
|
||||
//返回值示例:PICO 4|08:16:D5:70:20:11
|
||||
BLUETOOTH_INFO_DEVICE = 15,
|
||||
|
||||
//已连接的蓝牙设备信息
|
||||
//返回值格式:[蓝牙设备1名称|蓝牙设备1地址, 蓝牙设备2名称|蓝牙设备2地址, . . .]
|
||||
//返回值示例:[PICO 4|08:16:D5:70:20:11, PICO Neo 3|21:23:D5:7A:2C:DE]
|
||||
BLUETOOTH_INFO_CONNECTED = 16,
|
||||
|
||||
//相机温度单位摄氏度
|
||||
CAMERA_TEMPERATURE_CELSIUS = 17,
|
||||
|
||||
//相机温度单位华氏度
|
||||
CAMERA_TEMPERATURE_FAHRENHEIT = 18,
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fb47fac324da0244b89e5cba9b606db
|
||||
timeCreated: 1685937098
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum SystemKeyEnum
|
||||
{
|
||||
ENTER_KEY=0,
|
||||
BACK_KEY=1,
|
||||
VOLUME_KEY=2,
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d168ba74a784d1c8fcf699a5e6e12b5
|
||||
timeCreated: 1698917116
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public enum USBConfigModeEnum
|
||||
{
|
||||
MTP=0,
|
||||
CHARGE=1
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83c4de97e8bbda3448a5180986a87c33
|
||||
timeCreated: 1685944441
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5c24af23d2b3de43bf3444f7edca288
|
||||
timeCreated: 1685952511
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class BindCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<bool> mCallback;
|
||||
|
||||
public BindCallback(Action<bool> callback) : base("com.picoxr.tobservice.interfaces.BoolCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(bool var1)
|
||||
{
|
||||
Debug.Log("ToBService bindCallBack 回调:" + var1);
|
||||
PXR_EnterprisePlugin.GetServiceBinder();
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51a5199660b7a714aae526c9e8ecf42e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class BoolCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<bool> mCallback;
|
||||
|
||||
public BoolCallback(Action<bool> callback) : base("com.picoxr.tobservice.interfaces.BoolCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(bool var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback!=null)
|
||||
{
|
||||
mCallback(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ec069c2f433a8649af361d7ff835006
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class FileCopyCallback: AndroidJavaProxy
|
||||
{
|
||||
public Action mOnCopyStart;
|
||||
public Action<double> mOnCopyProgress;
|
||||
public Action<int> mOnCopyFinish;
|
||||
|
||||
public FileCopyCallback(Action onCopyStart,Action<double> onCopyProgress,Action<int> onCopyFinish) : base("com.picoxr.tobservice.interfaces.FileCopyCallback")
|
||||
{
|
||||
mOnCopyStart = onCopyStart;
|
||||
mOnCopyProgress = onCopyProgress;
|
||||
mOnCopyFinish = onCopyFinish;
|
||||
}
|
||||
|
||||
public void OnCopyStart()
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mOnCopyStart!=null)
|
||||
{
|
||||
mOnCopyStart();
|
||||
}
|
||||
});
|
||||
}
|
||||
public void OnCopyProgress(double var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mOnCopyProgress!=null)
|
||||
{
|
||||
mOnCopyProgress(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void OnCopyFinish(int var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mOnCopyFinish!=null)
|
||||
{
|
||||
mOnCopyFinish(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f1ff22a32748af4ebc61fc3e215b7c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class IntCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<int> mCallback;
|
||||
|
||||
public IntCallback(Action<int> callback) : base("com.picoxr.tobservice.interfaces.IntCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(int var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96277bb913de2a84e8f29f38fbdc9f29
|
||||
timeCreated: 1685959032
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class LongCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<long> mCallback;
|
||||
|
||||
public LongCallback(Action<long> callback) : base("com.picoxr.tobservice.interfaces.LongCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(long var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be7c175a931c58d43adc4dfd8b4919a2
|
||||
timeCreated: 1685959096
|
||||
@@ -1,119 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR;
|
||||
#if PICO_XR
|
||||
using Unity.XR.PXR;
|
||||
#else
|
||||
using Unity.XR.OpenXR.Features.PICOSupport;
|
||||
#endif
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class MarkerInfoCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<List<MarkerInfo>> mCallback;
|
||||
private List<MarkerInfo> mlist = new List<MarkerInfo>();
|
||||
private TrackingOriginModeFlags TrackingMode;
|
||||
private float YOffset;
|
||||
|
||||
public MarkerInfoCallback(TrackingOriginModeFlags trackingMode, float cameraYOffset,
|
||||
Action<List<MarkerInfo>> callback) : base("com.picoxr.tobservice.interfaces.StringCallback")
|
||||
{
|
||||
TrackingMode = trackingMode;
|
||||
YOffset = cameraYOffset;
|
||||
mCallback = callback;
|
||||
mlist.Clear();
|
||||
#if PICO_XR
|
||||
#else
|
||||
OpenXRExtensions.SetMarkMode();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void CallBack(string var1)
|
||||
{
|
||||
Debug.Log("ToBService MarkerInfo Callback 回调:" + var1);
|
||||
List<MarkerInfo> tmp = JsonToMarkerInfos(var1);
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(tmp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<MarkerInfo> JsonToMarkerInfos(string json)
|
||||
{
|
||||
if (string.IsNullOrEmpty(json))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<MarkerInfo> ModelList = new List<MarkerInfo>();
|
||||
JsonData jsonData = JsonMapper.ToObject(json);
|
||||
IDictionary dictionary = jsonData as IDictionary;
|
||||
for (int i = 0; i < dictionary.Count; i++)
|
||||
{
|
||||
Debug.Log("TOB TestDemo---- MarkerInfo Callback 回调:1");
|
||||
|
||||
float OriginHeight = 0;
|
||||
if (TrackingMode == TrackingOriginModeFlags.Device || TrackingMode == TrackingOriginModeFlags.Floor)
|
||||
{
|
||||
|
||||
#if PICO_XR
|
||||
OriginHeight = PXR_Plugin.System.UPxr_GetConfigFloat(ConfigType.ToDelaSensorY);
|
||||
#else
|
||||
float trackingorigin_height = PXR_EnterprisePlugin.oxr_get_trackingorigin_height();
|
||||
float locationheight = OpenXRExtensions.GetLocationHeight();
|
||||
if (TrackingMode == TrackingOriginModeFlags.Floor)
|
||||
{
|
||||
YOffset = 0;
|
||||
OriginHeight = -trackingorigin_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
// OriginHeight = trackingorigin_height + locationheight;
|
||||
// OriginHeight = locationheight;
|
||||
OriginHeight = -trackingorigin_height;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
OriginHeight = 0;
|
||||
YOffset = 0;
|
||||
}
|
||||
|
||||
Debug.Log("TOB TestDemo---- MarkerInfo Callback 回调:OriginHeight:"+OriginHeight );
|
||||
MarkerInfo model = new MarkerInfo();
|
||||
model.posX = double.Parse(jsonData[i]["posX"].ToString());
|
||||
model.posY = double.Parse(jsonData[i]["posY"].ToString()) + OriginHeight + YOffset;
|
||||
model.posZ = -double.Parse(jsonData[i]["posZ"].ToString());
|
||||
|
||||
model.rotationX = -double.Parse(jsonData[i]["rotationX"].ToString());
|
||||
model.rotationY = -double.Parse(jsonData[i]["rotationY"].ToString());
|
||||
model.rotationZ = double.Parse(jsonData[i]["rotationZ"].ToString());
|
||||
model.rotationW = double.Parse(jsonData[i]["rotationW"].ToString());
|
||||
|
||||
model.validFlag = int.Parse(jsonData[i]["validFlag"].ToString());
|
||||
model.markerType = int.Parse(jsonData[i]["markerType"].ToString());
|
||||
model.iMarkerId = int.Parse(jsonData[i]["iMarkerId"].ToString());
|
||||
model.dTimestamp = double.Parse(jsonData[i]["dTimestamp"].ToString());
|
||||
|
||||
IDictionary dictionaryReserve = jsonData[i]["reserve"] as IDictionary;
|
||||
model.reserve = new float[dictionaryReserve.Count];
|
||||
for (int j = 0; j < dictionaryReserve.Count; j++)
|
||||
{
|
||||
model.reserve[j] = float.Parse(jsonData[i]["reserve"][j].ToString());
|
||||
}
|
||||
|
||||
ModelList.Add(model);
|
||||
}
|
||||
|
||||
return ModelList;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f3dd52fe57c0fc4490989b3e1841b24
|
||||
timeCreated: 1686224891
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class StringCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<string> mCallback;
|
||||
|
||||
public StringCallback(Action<string> callback) : base("com.picoxr.tobservice.interfaces.StringCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(string var1)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(var1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0032579f19172484ebd2e85a16a8194d
|
||||
timeCreated: 1685959143
|
||||
@@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class SystemUpdateCallback: AndroidJavaProxy
|
||||
{
|
||||
public Action<int, float> OnUpdateStatusChanged;
|
||||
public Action<int, string> OnUpdateComplete;
|
||||
|
||||
public SystemUpdateCallback(Action<int, float> onUpdateStatusChanged,Action<int, string> onUpdateComplete) : base("com.picoxr.tobservice.interfaces.SystemUpdateCallback")
|
||||
{
|
||||
OnUpdateStatusChanged = onUpdateStatusChanged;
|
||||
OnUpdateComplete = onUpdateComplete;
|
||||
}
|
||||
|
||||
public void onUpdateStatusChanged(int statusCode, float percent)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (OnUpdateStatusChanged != null)
|
||||
{
|
||||
OnUpdateStatusChanged(statusCode, percent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onUpdateComplete(int errorCode, String errorMsg)
|
||||
{
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (OnUpdateComplete != null)
|
||||
{
|
||||
OnUpdateComplete(errorCode, errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c142166e37fe1045a00e75c0b43b7e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,59 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class WifiDisplayModelCallback : AndroidJavaProxy
|
||||
{
|
||||
public Action<List<WifiDisplayModel>> mCallback;
|
||||
|
||||
public WifiDisplayModelCallback(Action<List<WifiDisplayModel>> callback) : base("com.picoxr.tobservice.interfaces.StringCallback")
|
||||
{
|
||||
mCallback = callback;
|
||||
}
|
||||
|
||||
public void CallBack(string var1)
|
||||
{
|
||||
Debug.Log("ToBService WifiDisplayModelCallback 回调:" + var1);
|
||||
List<WifiDisplayModel> tmp = JsonToWifiDisplayModel(var1);
|
||||
PXR_EnterpriseTools.QueueOnMainThread(() =>
|
||||
{
|
||||
if (mCallback != null)
|
||||
{
|
||||
mCallback(tmp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<WifiDisplayModel> JsonToWifiDisplayModel(string json)
|
||||
{
|
||||
if (string.IsNullOrEmpty(json))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<WifiDisplayModel> ModelList = new List<WifiDisplayModel>();
|
||||
JsonData jsonData = JsonMapper.ToObject(json);
|
||||
IDictionary dictionary = jsonData as IDictionary;
|
||||
for (int i = 0; i < dictionary.Count; i++)
|
||||
{
|
||||
WifiDisplayModel model = new WifiDisplayModel();
|
||||
model.deviceAddress = jsonData[i]["deviceAddress"].ToString();
|
||||
model.deviceName = jsonData[i]["deviceName"].ToString();
|
||||
model.isAvailable = bool.Parse(jsonData[i]["isAvailable"].ToString());
|
||||
model.canConnect = bool.Parse(jsonData[i]["canConnect"].ToString());
|
||||
model.isRemembered = bool.Parse(jsonData[i]["isRemembered"].ToString());
|
||||
model.statusCode = int.Parse(jsonData[i]["statusCode"].ToString());
|
||||
model.status = jsonData[i]["status"].ToString();
|
||||
model.description = jsonData[i]["description"].ToString();
|
||||
|
||||
ModelList.Add(model);
|
||||
}
|
||||
|
||||
return ModelList;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cf02f2e31d415c41b26dd8e5108dada
|
||||
timeCreated: 1686050869
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f65db304235e324c898720b2c3f4ce1
|
||||
timeCreated: 1686224723
|
||||
@@ -1,132 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class Intent
|
||||
{
|
||||
private string Componentpkg = "";
|
||||
private string Componentcls = "";
|
||||
private string Action = "";
|
||||
private string type = "";
|
||||
private string url = "";
|
||||
|
||||
List<string> categoryList = new List<string>();
|
||||
Dictionary<string, string> stringPairs = new Dictionary<string, string>();
|
||||
Dictionary<string, bool> boolPairs = new Dictionary<string, bool>();
|
||||
Dictionary<string, int> intPairs = new Dictionary<string, int>();
|
||||
Dictionary<string, float> floatPairs = new Dictionary<string, float>();
|
||||
Dictionary<string, double> doublePairs = new Dictionary<string, double>();
|
||||
|
||||
public void setComponent(string pkg, string cls)
|
||||
{
|
||||
Componentpkg = pkg;
|
||||
Componentcls = cls;
|
||||
}
|
||||
|
||||
public void setAction(string _Action)
|
||||
{
|
||||
Action = _Action;
|
||||
}
|
||||
|
||||
public void setType(string _type)
|
||||
{
|
||||
type = _type;
|
||||
}
|
||||
|
||||
public void setData(string _url)
|
||||
{
|
||||
url = _url;
|
||||
}
|
||||
|
||||
public void addCategory(string _category)
|
||||
{
|
||||
categoryList.Add(_category);
|
||||
}
|
||||
|
||||
public void putExtra(string name, string value)
|
||||
{
|
||||
stringPairs.Add(name, value);
|
||||
}
|
||||
|
||||
public void putExtra(string name, int value)
|
||||
{
|
||||
intPairs.Add(name, value);
|
||||
}
|
||||
|
||||
public void putExtra(string name, float value)
|
||||
{
|
||||
floatPairs.Add(name, value);
|
||||
}
|
||||
|
||||
public void putExtra(string name, double value)
|
||||
{
|
||||
doublePairs.Add(name, value);
|
||||
}
|
||||
|
||||
public void putExtra(string name, bool value)
|
||||
{
|
||||
boolPairs.Add(name, value);
|
||||
}
|
||||
|
||||
public AndroidJavaObject getIntent()
|
||||
{
|
||||
AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent");
|
||||
if (!string.IsNullOrEmpty(Componentpkg) && !string.IsNullOrEmpty(Componentcls))
|
||||
{
|
||||
AndroidJavaObject componentName =
|
||||
new AndroidJavaObject("android.content.ComponentName", Componentpkg, Componentcls);
|
||||
intent.Call<AndroidJavaObject>("setComponent", componentName);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Action))
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("setAction", Action);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("setType", type);
|
||||
}
|
||||
|
||||
// mIntent.setData(Uri.parse(""));
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
AndroidJavaClass uriClass = new AndroidJavaClass("android.net.Uri"); // 对应的安卓调用函数是Uri.parse()
|
||||
AndroidJavaObject uriObject = uriClass.CallStatic<AndroidJavaObject>("parse", url);
|
||||
intent.Call<AndroidJavaObject>("setData", uriObject);
|
||||
}
|
||||
|
||||
if (categoryList.Count != 0)
|
||||
{
|
||||
for (int i = 0; i < categoryList.Count; i++)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("addCategory", categoryList[i]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, string> kvp in stringPairs)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("putExtra", kvp.Key, kvp.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, int> kvp in intPairs)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("putExtra", kvp.Key, kvp.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, bool> kvp in boolPairs)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("putExtra", kvp.Key, kvp.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, float> kvp in floatPairs)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("putExtra", kvp.Key, kvp.Value);
|
||||
}
|
||||
foreach (KeyValuePair<string, double> kvp in doublePairs)
|
||||
{
|
||||
intent.Call<AndroidJavaObject>("putExtra", kvp.Key, kvp.Value);
|
||||
}
|
||||
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e2fc05a295c4d17bf17cf1784ef3059
|
||||
timeCreated: 1709199569
|
||||
@@ -1,20 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class LargeSpaceQuickModeInfo
|
||||
{
|
||||
public bool status;
|
||||
public int length;
|
||||
public int width;
|
||||
public int originType;
|
||||
|
||||
public LargeSpaceQuickModeInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return
|
||||
$"{nameof(status)}: {status}, {nameof(length)}: {length}, {nameof(width)}: {width}, {nameof(originType)}: {originType}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb0961e0f2e64cd5bfff021b5f334bea
|
||||
timeCreated: 1715673498
|
||||
@@ -1,38 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class MarkerInfo
|
||||
{
|
||||
// position
|
||||
public double posX;
|
||||
public double posY;
|
||||
public double posZ;
|
||||
|
||||
// rotation
|
||||
public double rotationX;
|
||||
public double rotationY;
|
||||
public double rotationZ;
|
||||
public double rotationW;
|
||||
|
||||
// 标志位:识别无效=0,识别有效=1
|
||||
public int validFlag;
|
||||
|
||||
// 类型:静态=1/动态=0
|
||||
public int markerType;
|
||||
|
||||
// marker id
|
||||
public int iMarkerId;
|
||||
|
||||
// 检测图像的时间戳
|
||||
public double dTimestamp;
|
||||
|
||||
// 预留标志位
|
||||
public float[] reserve;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{nameof(posX)}: {posX}, {nameof(posY)}: {posY}, {nameof(posZ)}: {posZ}, {nameof(rotationX)}: {rotationX}, {nameof(rotationY)}: {rotationY}, {nameof(rotationZ)}: {rotationZ}, {nameof(rotationW)}: {rotationW}, {nameof(validFlag)}: {validFlag}, {nameof(markerType)}: {markerType}, {nameof(iMarkerId)}: {iMarkerId}, {nameof(dTimestamp)}: {dTimestamp}, {nameof(reserve)}: {string.Join(" ", reserve)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f68848d9c705ba340a11b2713ae79b83
|
||||
timeCreated: 1686224373
|
||||
@@ -1,24 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class OffLineSystemUpdateConfig
|
||||
{
|
||||
//OTA压缩包路径
|
||||
public String otaFilePath = null;
|
||||
//升级完成后是否自动重启
|
||||
public Boolean autoReboot = true;
|
||||
//升级过程中是否显示进度
|
||||
public Boolean showProgress = false;
|
||||
public OffLineSystemUpdateConfig()
|
||||
{
|
||||
}
|
||||
|
||||
public OffLineSystemUpdateConfig(string otaFilePath, bool autoReboot, bool showProgress)
|
||||
{
|
||||
this.otaFilePath = otaFilePath;
|
||||
this.autoReboot = autoReboot;
|
||||
this.showProgress = showProgress;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 886b1052c0d3a734a9e4fdb1a95d5982
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class Point3D
|
||||
{
|
||||
public double x;
|
||||
public double y;
|
||||
public double z;
|
||||
|
||||
public Point3D()
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Point3D:{nameof(x)}: {x}, {nameof(y)}: {y}, {nameof(z)}: {z}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4808a326866641fdbd01f82a39e44aaf
|
||||
timeCreated: 1715150347
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class WifiDisplayModel
|
||||
{
|
||||
public static int STATUS_NOT_CONNECT = -1;
|
||||
public static int STATUS_NONE = 0;
|
||||
public static int STATUS_SCANNING = 1;
|
||||
public static int STATUS_CONNECTING = 2;
|
||||
public static int STATUS_AVAILABLE = 3;
|
||||
public static int STATUS_NOT_AVAILABLE = 4;
|
||||
public static int STATUS_IN_USE = 5;
|
||||
public static int STATUS_CONNECTED = 6;
|
||||
|
||||
public string deviceAddress;
|
||||
public string deviceName;
|
||||
public bool isAvailable;
|
||||
public bool canConnect;
|
||||
public bool isRemembered;
|
||||
public int statusCode;
|
||||
public string status;
|
||||
public string description;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39f5fd05aee2d0047932945fab6f46a1
|
||||
timeCreated: 1686050281
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ec549f2e9b5b3d48bab5cb6bcf28a7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b696a6381610a1f46b9bb9ca74202107
|
||||
timeCreated: 1685947774
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa2c6dd6feb090341b43b2f825f99a7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.XR.PICO.TOBSupport
|
||||
{
|
||||
public class PXR_EnterpriseTools : MonoBehaviour
|
||||
{
|
||||
public struct NoDelayedQueueItem
|
||||
{
|
||||
public Action action;
|
||||
}
|
||||
|
||||
private List<NoDelayedQueueItem> _actions = new List<NoDelayedQueueItem>();
|
||||
List<NoDelayedQueueItem> _currentActions = new List<NoDelayedQueueItem>();
|
||||
private static PXR_EnterpriseTools instance;
|
||||
|
||||
public void StartUp()
|
||||
{
|
||||
Debug.Log("ToBService PXR_EnterpriseTools StartUp");
|
||||
}
|
||||
public static PXR_EnterpriseTools Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = FindObjectOfType<PXR_EnterpriseTools>();
|
||||
}
|
||||
|
||||
if (instance == null)
|
||||
{
|
||||
GameObject obj = new GameObject("PXR_EnterpriseTools");
|
||||
instance = obj.AddComponent<PXR_EnterpriseTools>();
|
||||
DontDestroyOnLoad(obj);
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void QueueOnMainThread(Action taction)
|
||||
{
|
||||
lock (instance._actions)
|
||||
{
|
||||
instance._actions.Add(new NoDelayedQueueItem { action = taction });
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_actions.Count > 0)
|
||||
{
|
||||
lock (_actions)
|
||||
{
|
||||
_currentActions.Clear();
|
||||
_currentActions.AddRange(_actions);
|
||||
_actions.Clear();
|
||||
}
|
||||
|
||||
for (int i = 0; i < _currentActions.Count; i++)
|
||||
{
|
||||
_currentActions[i].action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fba0173074665504b9adf96a28713621
|
||||
timeCreated: 1686053214
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daa051af13219a1469fa16186d42f6fa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user