胡佳骏 1 year ago
parent
commit
2ba9508cfd

+ 4 - 0
Samples~/SDK/Modules/Module_Interaction/SCInputField/Resources/Keyboard/3DKeyboard.prefab

@@ -10284,6 +10284,10 @@ PrefabInstance:
       propertyPath: m_IsActive
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 2119722584, guid: 2faf80610c5b5cf4abcc923f052142cc, type: 3}
+      propertyPath: m_LocalPosition.z
+      value: 0.137
+      objectReference: {fileID: 0}
     - target: {fileID: 717101635510136807, guid: 2faf80610c5b5cf4abcc923f052142cc,
         type: 3}
       propertyPath: m_IsActive

+ 1 - 1
Samples~/SDK/NXR/Scripts/Api/Internal/Controller/NxrTrackedDevice.cs

@@ -143,7 +143,7 @@ namespace Nxr.Internal
         void Update()
         {
 #if UNITY_ANDROID //&& !UNITY_EDITOR
-            if (!NxrViewer.Instance.IsWinPlatform && !isGamePad)
+            if (NxrViewer.Instance&&!NxrViewer.Instance.IsWinPlatform && !isGamePad)
             {
                 // Android/NOLO
                 int noloType = GetNoloType();

+ 1 - 1
Samples~/SDK/NXR/Scripts/Api/NxrSDKApi.cs

@@ -254,7 +254,7 @@ namespace Nxr.Internal
                 asset.mHeadControl = HeadControl.GazeApplication;
                 asset.mTextureQuality = TextureQuality.Best;
                 asset.mTextureMSAA = TextureMSAA.MSAA_2X;
-                UnityEditor.AssetDatabase.CreateAsset(asset, assetpath);
+              //  UnityEditor.AssetDatabase.CreateAsset(asset, assetpath);
             }
 
             return asset;

+ 6 - 5
Samples~/SDK/NXR/Scripts/Api/NxrViewer.cs

@@ -66,6 +66,7 @@ namespace Nxr.Internal
 #endif
                 if (instance == null)
                 {
+                    /*
                     Debug.LogError("No NxrViewer instance found.  Ensure one exists in the scene, or call "
                                    + "NxrViewer.Create() at startup to generate one.\n"
                                    + "If one does exist but hasn't called Awake() yet, "
@@ -73,7 +74,7 @@ namespace Nxr.Internal
                                    + "In that case, consider moving "
                                    + "your first reference to NxrViewer.Instance to a later point in time.\n"
                                    + "If exiting the scene, this indicates that the NxrViewer object has already "
-                                   + "been destroyed.");
+                                   + "been destroyed.");*/
                 }
 
                 return instance;
@@ -1835,7 +1836,7 @@ namespace Nxr.Internal
 
         void OnDisable()
         {
-            device.OnPause(true);
+            device?.OnPause(true);
             Debug.Log("NxrViewer->OnDisable");
             StopCoroutine("EndOfFrame");
         }
@@ -1845,7 +1846,7 @@ namespace Nxr.Internal
         void OnPause()
         {
             onResume = null;
-            device.OnApplicationPause(true);
+            device?.OnApplicationPause(true);
         }
 
         IEnumerator OnResume()
@@ -1858,7 +1859,7 @@ namespace Nxr.Internal
                 UpdateHeadControl();
             }
 
-            device.OnApplicationPause(false);
+            device?.OnApplicationPause(false);
         }
 
         public void SetPause(bool pause)
@@ -1882,7 +1883,7 @@ namespace Nxr.Internal
         void OnApplicationFocus(bool focus)
         {
             Debug.Log("NxrViewer->OnApplicationFocus," + focus);
-            device.OnFocus(focus);
+            device?.OnFocus(focus);
         }
 
         void OnApplicationQuit()

+ 1 - 0
Samples~/SDK/NXR/Scripts/Task/Controller/InteractionManager.cs

@@ -261,6 +261,7 @@ namespace NibiruTask
         {
             if (Application.isEditor)
             {
+                return new ControllerConfig();
                 bool IsSixDofCtrl = false;
                 mControllerConfig.modelPath = Application.dataPath + "/Samples/0.0.1/SDK/NXR/Resources/Controller/Objs/26";
                 if (IsSixDofCtrl)

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

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

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

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

+ 0 - 477
Samples~/SDK/XRInputManager.cs

@@ -1,477 +0,0 @@
-using NRKernal;
-using SC.XR.Unity.Module_InputSystem;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.InputSystem;
-using UnityEngine.XR;
-using UnityEngine.XR.OpenXR.Input;
-
-public class XRInputManager : MonoBehaviour
-{
-    public static bool isCheckHand;
-    public static bool leftDown;
-    public static bool rightDown;
-    public Transform left = null;
-    public Transform right = null;
-    public InputActionProperty inputEvent;
-    public List<InputActionReference> listinput;
-    int xy = 8;
-    private void Awake()
-    {
-        if(isHand)
-        {
-            handinput.SetActive(true);
-            cinput.SetActive(false);
-        }else
-        {
-            handinput.SetActive(false);
-            cinput.SetActive(true);
-
-        }
-        isCheckHand = isHand;
-    }
-    // Start is called before the first frame update
-    void Start()
-    {
-       // API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-       
-        /*
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.APP, () => {
-            Debug.Log("ControllerButton.APP===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-
-        });
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.BEGIN, () => {
-            Debug.Log("ControllerButton.BEGIN===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-        });
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.END, () => {
-            Debug.Log("ControllerButton.END===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-        });
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.GRIP, () => {
-            Debug.Log("ControllerButton.GRIP===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-        });
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.HOME, () => {
-            Debug.Log("ControllerButton.HOME===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-        });*/
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.TRIGGER, () => {
-            Debug.Log("ControllerButton.TRIGGER===>Down");
-            if (isHand)
-            {
-                // API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-                rightDown = true;
-                API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-            }
-            else
-            {
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            }
-        });
-        /*
-        NRInput.AddDownListener(ControllerHandEnum.Right, ControllerButton.TOUCHPAD_BUTTON, () => {
-            Debug.Log("ControllerButton.TOUCHPAD_BUTTON===>Down");
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-        });
-        
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.APP, () => {
-            Debug.Log("ControllerButton.APP===>UP");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.BEGIN, () => {
-            Debug.Log("ControllerButton.BEGIN===>UP");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.END, () => {
-            Debug.Log("ControllerButton.END===>UP");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.GRIP, () => {
-            Debug.Log("ControllerButton.GRIP===>UP");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.HOME, () => {
-            Debug.Log("ControllerButton.HOME===>UP");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });*/
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.TRIGGER, () => {
-            Debug.Log("ControllerButton.HOME===>TRIGGER");
-            if (isHand)
-            {
-                rightDown = false;
-                API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-                // API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            }else
-            {
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-
-            }
-        });/*
-        NRInput.AddUpListener(ControllerHandEnum.Right, ControllerButton.TOUCHPAD_BUTTON, () => {
-            Debug.Log("ControllerButton.HOME===>TOUCHPAD_BUTTON");
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-            API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-        });
-        */
-        NRInput.AddDownListener(ControllerHandEnum.Left, ControllerButton.TRIGGER, () => {
-            Debug.Log("ControllerButton.HOME===>TRIGGER");
-            if (isHand)
-            {
-                leftDown = false;
-                API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-            }
-        });
-            NRInput.AddUpListener(ControllerHandEnum.Left, ControllerButton.TRIGGER, () => {
-            Debug.Log("ControllerButton.HOME===>TRIGGER");
-                if (isHand)
-                {
-                    leftDown = false;
-                    API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTLeft.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-                    // API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-                }
-            });
-        Invoke("startXR", 1f);
-        /*
-        return;
-        for (int i = 0; i < 15; i++)
-        {
-            listinput[i].action.Enable();
-            listinput[i].action.performed += OnEventL;
-            listinput[i].action.canceled += OnCanceledEventL;
-        }
-        for (int i = 15; i < listinput.Count; i++)
-        {
-            listinput[i].action.Enable();
-            listinput[i].action.performed += OnEventR;
-            listinput[i].action.canceled += OnCanceledEventR;
-        }
-        InputDevices.deviceConnected += onDeviceConnected;
-        InputDevices.deviceDisconnected += onDeviceDisConnected;
-        Invoke("startXR", 1f);*/
-    }
-
-    private void downTP()
-    {
-    }
-    public GameObject handinput;
-    public GameObject cinput;
-
-    public bool isHand;
-    List<Vector3> leftInfo = new List<Vector3>();
-    List<Vector3> rightInfo = new List<Vector3>();
-    void startXR()
-    {
-        if(isHand)
-        {
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, false);
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, false);
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.GGT26Dof, true);
-
-        }else
-        {
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, true);
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, false);
-            Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.GGT26Dof, false);
-
-        }
-
-#if UNITY_EDITOR
-        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);
-        right.gameObject.SetActive(false);
-        List<UnityEngine.XR.InputDevice> inputDevices = new List<UnityEngine.XR.InputDevice>();
-        InputDevices.GetDevices(inputDevices);
-        for (int i = 0; i < inputDevices.Count; i++)
-        {
-            onDeviceConnected(inputDevices[i]);
-        }*/
-    }
-    private void Update()
-    {
-        if (Input.GetKeyDown(KeyCode.X))
-        {
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-            //API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.X, InputKeyState.DOWN);
-        }
-        if (Input.GetKeyUp(KeyCode.X))
-        {
-            API_GSXR_Module_InputSystem_GGT26Dof.GSXR_GGTRight.inputDataGGT26Dof.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-
-           // API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.X, InputKeyState.UP);
-        }
-    }
-    private void onDeviceDisConnected(UnityEngine.XR.InputDevice obj)
-    {
-        if (obj.characteristics.ToString().Contains(InputDeviceCharacteristics.Left.ToString()))
-        {
-            Debug.Log("Left===>" + obj.isValid);
-            left.gameObject.SetActive(obj.isValid);
-        }
-
-        if (obj.characteristics.ToString().Contains(InputDeviceCharacteristics.Right.ToString()))
-        {
-            Debug.Log("Right===>" + obj.isValid);
-            right.gameObject.SetActive(obj.isValid);
-        }
-    }
-
-    private void OnApplicationPause(bool pause)
-    {
-        if (!pause)
-        {
-            List<UnityEngine.XR.InputDevice> inputDevices = new List<UnityEngine.XR.InputDevice>();
-            InputDevices.GetDevices(inputDevices);
-            for (int i = 0; i < inputDevices.Count; i++)
-            {
-                onDeviceConnected(inputDevices[i]);
-            }
-        }
-    }
-
-    private void onDeviceConnected(UnityEngine.XR.InputDevice obj)
-    {
-        if (obj.characteristics.ToString().Contains(InputDeviceCharacteristics.Left.ToString()))
-        {
-            Debug.Log("Left===>" + obj.isValid);
-            left.gameObject.SetActive(obj.isValid);
-        }
-
-        if (obj.characteristics.ToString().Contains(InputDeviceCharacteristics.Right.ToString()))
-        {
-            Debug.Log("Right===>" + obj.isValid);
-            right.gameObject.SetActive(obj.isValid);
-        }
-
-    }
-    private void OnCanceledEventL(InputAction.CallbackContext context)
-    {
-        Debug.Log("OnCanceledEventL" + context.control.name);
-        switch (context.control.name)
-        {
-            case "secondarytouched":
-                break;
-            case "secondarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Y, InputKeyState.UP);
-
-                break;
-            case "primarytouched":
-                break;
-            case "primarybutton":
-                Debug.Log("InputKeyCode.A===¡·UP");
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.X, InputKeyState.UP);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-
-                break;
-            case "touchpadtouched":
-                break;
-            case "thumbstickclicked":
-                break;
-            case "thumbstick":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.JoystickX = xy + (int)(context.ReadValue<Vector2>().x * 10);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.JoystickY = xy + (int)(context.ReadValue<Vector2>().y * 10);
-
-                break;
-            case "grip":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.HallInside = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "grippressed":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.LHallInside, InputKeyState.UP);
-
-                break;
-            case "trigger":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.HallFoward = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "menu":
-                Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, true);
-                Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, false);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.LFunction, InputKeyState.UP);
-                break;
-        }
-    }
-    void OnEventL(InputAction.CallbackContext context)
-    {
-        Debug.Log("OnEventL" + context.control.name);
-        switch (context.control.name)
-        {
-            case "secondarytouched":
-                break;
-            case "secondarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Y, InputKeyState.DOWN);
-
-                break;
-            case "primarytouched":
-                break;
-            case "primarybutton":
-                Debug.Log("InputKeyCode.A===¡·DOWN");
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.X, InputKeyState.DOWN);
-
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-                break;
-            case "touchpadtouched":
-                break;
-            case "thumbstickclicked":
-                break;
-            case "thumbstick":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.JoystickX = xy + (int)(context.ReadValue<Vector2>().x * 10);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.JoystickY = xy + (int)(context.ReadValue<Vector2>().y * 10);
-
-                break;
-            case "grip":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.HallInside = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "grippressed":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.LHallInside, InputKeyState.DOWN);
-
-                break;
-            case "trigger":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.HallFoward = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "menu":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSLeft.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.LFunction, InputKeyState.DOWN);
-                break;
-
-        }
-    }
-
-    private void OnCanceledEventR(InputAction.CallbackContext context)
-    {
-        Debug.Log("OnCanceledEventR" + context.control.name);
-        switch (context.control.name)
-        {
-            case "secondarytouched":
-                break;
-            case "secondarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.B, InputKeyState.UP);
-
-                break;
-            case "primarytouched":
-                break;
-            case "primarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.A, InputKeyState.UP);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.UP);
-
-                break;
-            case "touchpadtouched":
-                break;
-            case "thumbstickclicked":
-                break;
-            case "thumbstick":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.JoystickX = xy + (int)(context.ReadValue<Vector2>().x * 10);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.JoystickY = xy + (int)(context.ReadValue<Vector2>().y * 10);
-
-                break;
-            case "grip":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.HallInside = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "grippressed":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.RHallInside, InputKeyState.UP);
-
-                break;
-            case "trigger":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.HallFoward = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "menu":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.RFunction, InputKeyState.UP);
-
-                break;
-        }
-    }
-    void OnEventR(InputAction.CallbackContext context)
-    {
-        Debug.Log("OnEventR" + context.control.name);
-        switch (context.control.name)
-        {
-            case "secondarytouched":
-                break;
-            case "secondarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.B, InputKeyState.DOWN);
-
-                break;
-            case "primarytouched":
-                break;
-            case "primarybutton":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.A, InputKeyState.DOWN);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.Enter, InputKeyState.DOWN);
-
-                break;
-            case "touchpadtouched":
-                break;
-            case "thumbstickclicked":
-                break;
-            case "thumbstick":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.JoystickX = xy + (int)(context.ReadValue<Vector2>().x * 10);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.JoystickY = xy + (int)(context.ReadValue<Vector2>().y * 10);
-
-                break;
-            case "grip":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.HallInside = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "grippressed":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.RHallInside, InputKeyState.DOWN);
-
-                break;
-            case "trigger":
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.HallFoward = 10 - (int)((context.ReadValue<float>()) * 10f);
-
-                break;
-            case "menu":
-                Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.KS, true);
-                Module_InputSystem.instance.SetActiveInputDevice(InputDeviceType.Head, false);
-                API_GSXR_Module_InputSystem_KS.GSXR_KSRight.inputDataKS.inputKeys.InputDataAddKey(InputKeyCode.RFunction, InputKeyState.DOWN);
-
-                break;
-
-        }
-    }
-
-    // Debug.Log("OnEvent=name==>" + context.control.name);
-    /*
-    Debug.Log("OnEvent=layout==>" + context.control.layout);
-    Debug.Log("OnEvent=noisy==>" + context.control.noisy);
-    Debug.Log("OnEvent=path==>" + context.control.path);
-    Debug.Log("OnEvent=shortDisplayName==>" + context.control.shortDisplayName);
-    Debug.Log("OnEvent=synthetic==>" + context.control.synthetic);
-    Debug.Log("OnEvent=valueSizeInBytes==>" + context.control.valueSizeInBytes);
-    Debug.Log("OnEvent=valueType==>" + context.control.valueType.Name);
-    Debug.Log("OnEvent=variants==>" + context.control.variants);
-    Debug.Log("OnEvent=variants==>" + context.control.EvaluateMagnitude());*/
-}
-
-
-

+ 0 - 11
Samples~/SDK/XRInputManager.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8ff77cfe8e454344ba9328dd8422f16e
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: