Bläddra i källkod

更新RokidSDK

胡佳骏 1 år sedan
förälder
incheckning
d0b8897331

+ 12 - 5
Samples~/SDK/Common/StandardAssets/Materials/font_color_black_sprite.mat

@@ -2,15 +2,20 @@
 %TAG !u! tag:unity3d.com,2011:
 --- !u!21 &2100000
 Material:
-  serializedVersion: 6
+  serializedVersion: 8
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: font_color_black_sprite
   m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
-  m_ShaderKeywords: ETC1_EXTERNAL_ALPHA _ALPHATEST_ON _EMISSION _GLOSSYREFLECTIONS_OFF
-    _SPECULARHIGHLIGHTS_OFF
+  m_ValidKeywords:
+  - _ALPHATEST_ON
+  - _EMISSION
+  - _GLOSSYREFLECTIONS_OFF
+  - _SPECULARHIGHLIGHTS_OFF
+  m_InvalidKeywords:
+  - ETC1_EXTERNAL_ALPHA
   m_LightmapFlags: 2
   m_EnableInstancingVariants: 0
   m_DoubleSidedGI: 0
@@ -65,6 +70,7 @@ Material:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
+    m_Ints: []
     m_Floats:
     - _BumpScale: 1
     - _Cutoff: 0.5
@@ -91,7 +97,8 @@ Material:
     - _UVSec: 0
     - _ZWrite: 1
     m_Colors:
-    - _Color: {r: 0.2735849, g: 0.2735849, b: 0.2735849, a: 1}
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
     - _Emission: {r: 0, g: 0, b: 0, a: 0}
-    - _EmissionColor: {r: 0.36221787, g: 0.36221787, b: 0.36221787, a: 1}
+    - _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
     - _SpecColor: {r: 1, g: 0, b: 0, a: 1}
+  m_BuildTextureStacks: []

+ 89 - 9
Samples~/SDK/Examples/HandTracking/Scenes/00_InteractionExample.unity

@@ -11384,6 +11384,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!65 &333047515
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -17411,6 +17412,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &520389953
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -23872,12 +23874,15 @@ MonoBehaviour:
   m_HideMobileInput: 0
   m_CharacterValidation: 0
   m_CharacterLimit: 0
-  m_OnEndEdit:
+  m_OnSubmit:
     m_PersistentCalls:
       m_Calls: []
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
+  m_OnDidEndEdit:
+    m_PersistentCalls:
+      m_Calls: []
   m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
   m_CustomCaretColor: 0
   m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
@@ -27431,6 +27436,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!65 &821101799
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -28136,9 +28142,13 @@ MonoBehaviour:
   scaleMinimum: 0.1
   activeScaleMaxRestrict: 1
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 1
   showRotationHandleForY: 1
   showRotationHandleForZ: 1
+  axisScaleHandleSize: 0.016
   activeAxis: -1
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -28204,6 +28214,12 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!114 &847619677
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -28257,6 +28273,7 @@ MonoBehaviour:
   canTwoHandScale: 1
   minScaleRatio: 0.8
   maxScaleRatio: 100
+  isParentDrag: 0
 --- !u!82 &847619679
 AudioSource:
   m_ObjectHideFlags: 0
@@ -29358,6 +29375,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &863729730
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -32087,6 +32105,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &919242387
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -32673,7 +32692,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 933011481}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: -0.2, z: 0}
+  m_LocalPosition: {x: 0, y: -1.01, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
@@ -32686,7 +32705,7 @@ Transform:
   - {fileID: 915936778}
   - {fileID: 1036272041}
   m_Father: {fileID: 0}
-  m_RootOrder: 0
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &937271187
 GameObject:
@@ -39242,9 +39261,13 @@ MonoBehaviour:
   scaleMinimum: 0.05
   activeScaleMaxRestrict: 0
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 1
   showRotationHandleForY: 1
   showRotationHandleForZ: 1
+  axisScaleHandleSize: 0.016
   activeAxis: 0
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -39310,6 +39333,12 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &1083363453
 GameObject:
   m_ObjectHideFlags: 0
@@ -39770,9 +39799,13 @@ MonoBehaviour:
   scaleMinimum: 0.05
   activeScaleMaxRestrict: 0
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 0
   showRotationHandleForY: 1
   showRotationHandleForZ: 0
+  axisScaleHandleSize: 0.016
   activeAxis: 0
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -39838,6 +39871,12 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!65 &1090557030
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -42920,7 +42959,7 @@ RectTransform:
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 10, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
@@ -46913,7 +46952,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 1
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
 --- !u!1001 &1250827920
 PrefabInstance:
@@ -53727,7 +53766,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &1483102466
 Transform:
   m_ObjectHideFlags: 0
@@ -56475,6 +56514,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &1557944098
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -60705,9 +60745,13 @@ MonoBehaviour:
   scaleMinimum: 0.05
   activeScaleMaxRestrict: 0
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 1
   showRotationHandleForY: 1
   showRotationHandleForZ: 1
+  axisScaleHandleSize: 0.016
   activeAxis: 0
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -60773,6 +60817,12 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!114 &1699980716
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -60813,6 +60863,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &1699980717
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -61676,9 +61727,13 @@ MonoBehaviour:
   scaleMinimum: 0.05
   activeScaleMaxRestrict: 0
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 1
   showRotationHandleForY: 1
   showRotationHandleForZ: 1
+  axisScaleHandleSize: 0.016
   activeAxis: 0
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -61744,6 +61799,12 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!65 &1725414736
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -63917,7 +63978,7 @@ MonoBehaviour:
   m_FallbackScreenDPI: 96
   m_DefaultSpriteDPI: 96
   m_DynamicPixelsPerUnit: 1
-  m_PresetInfoIsWorld: 0
+  m_PresetInfoIsWorld: 1
 --- !u!223 &1832438707
 Canvas:
   m_ObjectHideFlags: 0
@@ -64048,6 +64109,7 @@ MonoBehaviour:
   canTwoHandScale: 1
   minScaleRatio: 0.8
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!114 &1841499226
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -64081,9 +64143,13 @@ MonoBehaviour:
   scaleMinimum: 0.05
   activeScaleMaxRestrict: 0
   scaleMaximum: 2
+  scaleHandleSize: 0.016
+  BoundBoxCollider: {fileID: 0}
+  rotationHandleSize: 0.016
   showRotationHandleForX: 1
   showRotationHandleForY: 1
   showRotationHandleForZ: 1
+  axisScaleHandleSize: 0.016
   activeAxis: -2
   RotateStartAudio: 4
   RotateStopAudio: 3
@@ -64101,6 +64167,12 @@ MonoBehaviour:
   ScaleStopped:
     m_PersistentCalls:
       m_Calls: []
+  Rotating:
+    m_PersistentCalls:
+      m_Calls: []
+  Scaling:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!65 &1841499228
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -65031,6 +65103,7 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
+  isParentDrag: 0
 --- !u!65 &1851956587
 BoxCollider:
   m_ObjectHideFlags: 0
@@ -68193,12 +68266,15 @@ MonoBehaviour:
   m_HideMobileInput: 0
   m_CharacterValidation: 0
   m_CharacterLimit: 0
-  m_OnEndEdit:
+  m_OnSubmit:
     m_PersistentCalls:
       m_Calls: []
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
+  m_OnDidEndEdit:
+    m_PersistentCalls:
+      m_Calls: []
   m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
   m_CustomCaretColor: 0
   m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
@@ -73982,7 +74058,7 @@ RectTransform:
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 15, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
@@ -76370,6 +76446,10 @@ PrefabInstance:
   m_Modification:
     m_TransformParent: {fileID: 0}
     m_Modifications:
+    - target: {fileID: 554484713, guid: 7cd0ceba7525bdc42a36be841a8aad16, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: -0.0027745876
+      objectReference: {fileID: 0}
     - target: {fileID: 5142388694048500748, guid: 7cd0ceba7525bdc42a36be841a8aad16, type: 3}
       propertyPath: m_RootOrder
       value: 2

+ 36 - 13
Samples~/SDK/Modules/Module_InputSystem/InputDeviceHand/HandPart/DevicePointer/FarPointer/FarPointer.cs

@@ -1,4 +1,5 @@
-using System;
+using Rokid.UXR.Interaction;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -102,13 +103,13 @@ namespace SC.XR.Unity.Module_InputSystem.InputDeviceHand {
         public GameObject rightHand;
         Vector3 up, forward = Vector3.forward;
         protected override void UpdateTransform() {
-
-            //if (HandRayOffset) {
-            //    transform.position = handDetector.inputDeviceHandPart.inputDataHand.handInfo.MainGrabPosition;
-            //} else {
-            //    transform.position = handDetector.inputDeviceHandPart.inputDeviceHandPartUI.modelHand.ActiveHandModel.GetJointTransform(FINGER.forefinger, JOINT.Four).position;
-            //}
-            transform.position = handDetector.inputDeviceHandPart.inputDeviceHandPartUI.modelHand.ActiveHandModel.GetJointTransform(FINGER.forefinger, JOINT.Four).position;
+    
+                //if (HandRayOffset) {
+                //    transform.position = handDetector.inputDeviceHandPart.inputDataHand.handInfo.MainGrabPosition;
+                //} else {
+                //    transform.position = handDetector.inputDeviceHandPart.inputDeviceHandPartUI.modelHand.ActiveHandModel.GetJointTransform(FINGER.forefinger, JOINT.Four).position;
+                //}
+                transform.position = handDetector.inputDeviceHandPart.inputDeviceHandPartUI.modelHand.ActiveHandModel.GetJointTransform(FINGER.forefinger, JOINT.Four).position;
 
             Quaternion temprotation = Quaternion.identity;
             if (handDetector.inputDeviceHandPart.PartType == InputDevicePartType.HandLeft) {
@@ -143,12 +144,34 @@ namespace SC.XR.Unity.Module_InputSystem.InputDeviceHand {
 
             if (handDetector.inputDeviceHandPart.PartType == InputDevicePartType.HandLeft) {
                 //  transform.position = transform.position + transform.rotation * LeftOffset;
-                transform.rotation = lR.transform.rotation;
-                transform.position = lR.transform.position;
+                if(XRInputManager.isHand)
+                {
+
+                    transform.rotation = lR.transform.rotation;
+                    transform.position = lR.transform.position;
+                }else
+                {
+
+                }
             } else if (handDetector.inputDeviceHandPart.PartType == InputDevicePartType.HandRight) {
-               //  transform.position = transform.position + transform.rotation * RightOffset;
-                transform.rotation = RR.transform.rotation;
-                transform.position = RR.transform.position;
+                //  transform.position = transform.position + transform.rotation * RightOffset;
+                 if(XRInputManager.isHand)
+                {
+
+                    transform.rotation = RR.transform.rotation;
+                    transform.position = RR.transform.position;
+                }else
+                {
+
+                    Transform t = ThreeDofEventInput.Instance.transform.GetChild(0);
+                    if (t)
+                    {
+                        transform.eulerAngles = t.eulerAngles;
+                        // rootLeftHand.transform.localPosition = new Vector3(rootLeftHand.transform.localPosition.x-20, rootLeftHand.transform.localPosition.y, rootLeftHand.transform.localPosition.z);
+                        transform.position = t.position;
+
+                    }
+                }
             }
 
         }

+ 3 - 2
Samples~/SDK/Modules/Module_InputSystem/InputDeviceHand/HandPart/DevicePointer/TouchPointer/TouchPointer.cs

@@ -108,8 +108,8 @@ namespace SC.XR.Unity.Module_InputSystem.InputDeviceHand {
 
         private BaseNearInteractionTouchable currentTouchableObject = null;
 
+        public static bool isJinJuli;
         protected override void DoTargetDetect() {
-
             Debug.Log("DoTargetDetect33333===");
             if (newClosestTouchable == null)
                 return;
@@ -117,10 +117,11 @@ namespace SC.XR.Unity.Module_InputSystem.InputDeviceHand {
             SCInputModule.Instance.ProcessCS(scPointEventData, transform, LayerMask, TouchDetectRadius * 2);
 
             IsFocusLocked = currentPokeDownObject != null;
+            isJinJuli = IsFocusLocked;
 
             //Debug.Log(scPointEventData.pointerCurrentRaycast.gameObject);
 
-            if(scPointEventData.pointerCurrentRaycast.gameObject) {
+            if (scPointEventData.pointerCurrentRaycast.gameObject) {
 
                 DistToTouchable = Vector3.Distance(transform.position, scPointEventData.pointerCurrentRaycast.worldPosition) - TouchDetectRadius;
                 bool newIsDown = (DistToTouchable < 0.0f);

+ 5 - 2
Samples~/SDK/Modules/Module_InputSystem/Resources/HandFarCursor/material/quan_2.mat

@@ -2,14 +2,15 @@
 %TAG !u! tag:unity3d.com,2011:
 --- !u!21 &2100000
 Material:
-  serializedVersion: 6
+  serializedVersion: 8
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: quan_2
   m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
-  m_ShaderKeywords: 
+  m_ValidKeywords: []
+  m_InvalidKeywords: []
   m_LightmapFlags: 4
   m_EnableInstancingVariants: 0
   m_DoubleSidedGI: 0
@@ -59,6 +60,7 @@ Material:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
+    m_Ints: []
     m_Floats:
     - PixelSnap: 0
     - _BumpScale: 1
@@ -83,3 +85,4 @@ Material:
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
     - _Flip: {r: 1, g: 1, b: 1, a: 1}
     - _RendererColor: {r: 1, g: 1, b: 1, a: 1}
+  m_BuildTextureStacks: []

+ 6 - 5
Samples~/SDK/Modules/Module_Interaction/SCInputField/Keyboard/Mono/SCKeyboardKey.cs

@@ -1,12 +1,14 @@
-using System.Collections;
+using SC.XR.Unity.Module_InputSystem;
+using SC.XR.Unity.Module_InputSystem.InputDeviceHand;
+using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.EventSystems;
 
 public class SCKeyboardKey : MonoBehaviour, IPointerHandler
 {
-    private Color color_Gray = new Color32(87, 87, b: 87, 255);
-    private Color color_Blue = new Color32(76, 166, 255, 200);
+    public Color color_Gray = new Color32(87, 87, b: 87, 255);
+    public Color color_Blue = new Color32(76, 166, 255, 200);
     protected virtual void OnEnable()
     {
     }
@@ -41,14 +43,13 @@ public class SCKeyboardKey : MonoBehaviour, IPointerHandler
         this.GetComponentInChildren<MeshRenderer>().material.color = color_Gray;
     }
 
-    public void OnPointerEnter(PointerEventData eventData)
+    public virtual void OnPointerEnter(PointerEventData eventData)
     {
         this.GetComponentInChildren<MeshRenderer>().material.color = color_Blue;
     }
 
     public void OnPointerDown(PointerEventData eventData)
     {
-
     }
 
     public void OnPointerClick(PointerEventData eventData)

+ 5 - 1
Samples~/SDK/Modules/Module_Interaction/SCInputField/Keyboard/Mono/SCKeyboardSpecialKey.cs

@@ -52,7 +52,11 @@ public class SCKeyboardSpecialKey : SCKeyboardKey
             callback?.Invoke();
         }
     }
-
+    public override void OnPointerEnter(PointerEventData eventData)
+    {
+        this.GetComponentInChildren<MeshRenderer>().material.color = color_Blue;
+        // base.OnPointerEnter(eventData);
+    }
     private void InitSpecialCallbackDic()
     {
         if (specialCallbackDic == null)

+ 0 - 8
Samples~/SDK/Plugins/Android.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 9ca430e915b0de7449ecc854246b6e3f
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 23
Samples~/SDK/Plugins/Android/AndroidManifest.xml

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.unity3d.player"
-    xmlns:tools="http://schemas.android.com/tools">
-  <uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
-  <uses-feature android:name="android.hardware.sensor.gyroscope" android:required="true"/>
-  <uses-feature android:name="android.hardware.usb.host"/>
-  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
-  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-  <uses-permission android:name="android.permission.CAMERA" />
-  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
-  <application>
-    <activity android:name="com.rokid.uxrunityplugin.UXRActivity"
-           android:theme="@style/UnityThemeSelector">
-      <intent-filter>
-        <action android:name="android.intent.action.MAIN" />
-        <category android:name="android.intent.category.LAUNCHER" />
-      </intent-filter>
-      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
-    </activity>
-  </application>
-</manifest>

+ 0 - 7
Samples~/SDK/Plugins/Android/AndroidManifest.xml.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 734bd46c551cff14c9014f1b33ce4d48
-TextScriptImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 31
Samples~/SDK/Plugins/Android/baseProjectTemplate.gradle

@@ -1,31 +0,0 @@
-allprojects {
-    buildscript {
-        repositories {**ARTIFACTORYREPOSITORY**
-        maven { url 'https://maven.rokid.com/repository/maven-public/' }
-            google()
-            jcenter()
-        }
-
-        dependencies {
-            // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
-            // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
-            // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
-            // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
-            classpath 'com.android.tools.build:gradle:4.0.1'
-            **BUILD_SCRIPT_DEPS**
-        }
-    }
-
-    repositories {**ARTIFACTORYREPOSITORY**
-    maven { url 'https://maven.rokid.com/repository/maven-public/' }
-        google()
-        jcenter()
-        flatDir {
-            dirs "${project(':unityLibrary').projectDir}/libs"
-        }
-    }
-}
-
-task clean(type: Delete) {
-    delete rootProject.buildDir
-}

+ 0 - 7
Samples~/SDK/Plugins/Android/baseProjectTemplate.gradle.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 25310e320c6d428459e3d17c2cc49f11
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 43
Samples~/SDK/Plugins/Android/mainTemplate.gradle

@@ -1,43 +0,0 @@
-apply plugin: 'com.android.library'
-**APPLY_PLUGINS**
-
-dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
-    //ºËÐÄÒÀÀµ
-implementation 'com.rokid.uxrplugin:rkuxrplugin:2.3.7' 
-//ÓïÒôʶ±ðÒÀÀµ
-implementation("com.rokid.axr:glassvoice-phone:1.3.0")
-**DEPS**}
-
-android {
-    compileSdkVersion **APIVERSION**
-    buildToolsVersion '**BUILDTOOLS**'
-
-    compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
-    }
-
-    defaultConfig {
-        minSdkVersion **MINSDKVERSION**
-        targetSdkVersion **TARGETSDKVERSION**
-        ndk {
-            abiFilters **ABIFILTERS**
-        }
-        versionCode **VERSIONCODE**
-        versionName '**VERSIONNAME**'
-        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
-    }
-
-    lintOptions {
-        abortOnError false
-    }
-
-    aaptOptions {
-        noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
-        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
-    }**PACKAGING_OPTIONS**
-}**REPOSITORIES**
-**IL_CPP_BUILD_SETUP**
-**SOURCE_BUILD_SETUP**
-**EXTERNAL_SOURCES**

+ 0 - 7
Samples~/SDK/Plugins/Android/mainTemplate.gradle.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 52c7b6f690f4f7f439e984d498005e19
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 105 - 12
Samples~/SDK/XRInputManager.cs

@@ -1,10 +1,12 @@
 
 using Rokid.UXR.Interaction;
+using Rokid.UXR.Module;
 using SC.XR.Unity.Module_InputSystem;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.Android;
 using UnityEngine.InputSystem;
 using UnityEngine.XR;
 using UnityEngine.XR.OpenXR.Input;
@@ -21,11 +23,21 @@ public class XRInputManager : MonoBehaviour
     int xy = 8;
     private void Awake()
     {
+        if (!Permission.HasUserAuthorizedPermission("android.permission.RECORD_AUDIO"))
+        {
+            Permission.RequestUserPermission("android.permission.RECORD_AUDIO");
+        }
+        isHand = true;
         isCheckHand = isHand;
+    }
+    public void OnReceive(string msg)
+    {
+
     }
     // Start is called before the first frame update
     void Start()
     {
+        ModuleManager.Instance.RegistModule("com.rokid.voicecommand.VoiceCommandHelper", false);
         // API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
 
         /*
@@ -170,13 +182,18 @@ public class XRInputManager : MonoBehaviour
     private void downTP()
     {
     }
-    public bool isHand;
+    public static bool isHand;
     List<Vector3> leftInfo = new List<Vector3>();
     List<Vector3> rightInfo = new List<Vector3>();
     void startXR()
     {
+        InteractorGroup.OnDownOrUp += OnDownOrUp;
+        InputModuleManager.OnModuleActive += OnModuleActive;
+        InteractorStateChange.OnPokePoseUpdate += OnPokePoseUpdate;
+
+        ThreeDofEventInput.OnPhoneRayForward += OnPhoneRayForward;
+
 
-        InteractorStateChange.OnPokePoseUpdate+= OnPokePoseUpdate;
         if (isHand)
         {
             Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, false);
@@ -191,10 +208,12 @@ public class XRInputManager : MonoBehaviour
 
         }
 
+        isHand=!InputModuleManager.Instance.GetThreeDofActive();
+
 #if UNITY_EDITOR
-      //  Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, false);
-    //    Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, true);
-    //    Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.GGT26Dof, false);
+        //  Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, false);
+        //    Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, true);
+        //    Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.GGT26Dof, false);
 #endif
         /*
         left.gameObject.SetActive(false);
@@ -207,24 +226,98 @@ public class XRInputManager : MonoBehaviour
         }*/
     }
 
+    private void OnDownOrUp(bool obj)
+    {
+        if(!isHand)
+        {
+            if (obj)
+            {
+                //   API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
+              //  API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
+            }
+            else
+            {
+
+             //   API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
+            }
+
+        }
+    }
+
+    private void OnModuleActive(InputModuleType obj)
+    {
+        if(obj==InputModuleType.ThreeDof)
+        {
+            isHand = false;
+
+        }
+        else
+        {
+            isHand = true;
+        }
+    }
+    private void OnPhoneRayForward(Vector3 obj)
+    {
+        if(!isHand)
+        {
+
+            rootRightHand.transform.eulerAngles = obj;
+            // rootLeftHand.transform.localPosition = new Vector3(rootLeftHand.transform.localPosition.x-20, rootLeftHand.transform.localPosition.y, rootLeftHand.transform.localPosition.z);
+            rootRightHand.transform.localPosition = new Vector3(0, -0.5f, 0.2f);
+        }
+    }
+
     public GameObject rootLeftHand;
     public GameObject rootRightHand;
     private void OnPokePoseUpdate(HandType arg0, UnityEngine.Pose arg1)
     {
-        if(HandType.LeftHand==arg0)
-        {
-            rootLeftHand.transform.position = arg1.position;
-            rootLeftHand.transform.rotation = arg1.rotation;
-        }else
+        if (isHand)
         {
-            rootRightHand.transform.position = arg1.position;
-            rootRightHand.transform.rotation = arg1.rotation;
+            if (HandType.LeftHand == arg0)
+            {
+             //   rootLeftHand.transform.position = arg1.position;
+            //    rootLeftHand.transform.rotation = arg1.rotation;
+            }
+            else
+            {
+             //   rootRightHand.transform.position = arg1.position;
+               // rootRightHand.transform.rotation = arg1.rotation;
 
+            }
         }
     }
 
     private void Update()
     {
+        if (Input.GetKeyDown(KeyCode.I))
+        {
+            isHand = false;
+        }
+        if (Input.GetKeyDown(KeyCode.U))
+        {
+            isHand = true;
+
+        }
+
+
+        if (Input.GetKeyUp(KeyCode.LeftArrow) || Input.GetKeyUp(KeyCode.RightArrow) || Input.GetKeyUp(KeyCode.UpArrow) || Input.GetKeyUp(KeyCode.DownArrow)
+                   || RKNativeInput.Instance.GetKeyUp(RKKeyEvent.KEY_LEFT) || RKNativeInput.Instance.GetKeyUp(RKKeyEvent.KEY_RIGHT) || RKNativeInput.Instance.GetKeyUp(RKKeyEvent.KEY_UP) || RKNativeInput.Instance.GetKeyUp(RKKeyEvent.KEY_DOWN)
+                   || Input.GetKeyUp(KeyCode.JoystickButton0))
+        {
+
+            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
+        }
+
+
+        if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.DownArrow)
+                   || RKNativeInput.Instance.GetKeyDown(RKKeyEvent.KEY_LEFT) || RKNativeInput.Instance.GetKeyDown(RKKeyEvent.KEY_RIGHT) || RKNativeInput.Instance.GetKeyDown(RKKeyEvent.KEY_UP) || RKNativeInput.Instance.GetKeyDown(RKKeyEvent.KEY_DOWN)
+                   || Input.GetKeyDown(KeyCode.JoystickButton0))
+        {
+
+            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
+        }
+
+
         bool ldown = GesEventInput.Instance.GetHandDown(HandType.LeftHand);
         if(ldown)
         {

+ 0 - 1
Samples~/SDK/XRRGBCamera.cs

@@ -24,7 +24,6 @@ public class XRRGBCamera : SingletonMono<XRRGBCamera>
 
     public void playCamera(int w, int h)
     {
-        return;
         if (RGBCamTexture != null && RGBCamTexture.isPlaying)
         {
             RGBCamTexture.Stop();