├── .gitignore ├── Assets ├── CreateTestDriver.cs ├── CreateTestDriver.cs.meta ├── Editor.meta ├── Editor │ ├── XRInputDebugger.cs │ └── XRInputDebugger.cs.meta ├── Original Omnibus.meta ├── Original Omnibus │ ├── Omnibus.unity │ ├── Omnibus.unity.meta │ ├── XRPlatformToText.cs │ └── XRPlatformToText.cs.meta ├── Plugins.meta ├── Plugins │ ├── Android.meta │ └── Android │ │ ├── assets.meta │ │ └── assets │ │ ├── oculussig_1KWPH802GS8137 │ │ ├── oculussig_1KWPH802GS8137.meta │ │ ├── oculussig_5702c45d │ │ ├── oculussig_5702c45d.meta │ │ ├── oculussig_85b6364b49363431 │ │ ├── oculussig_85b6364b49363431.meta │ │ ├── oculussig_85b6364b49363432 │ │ ├── oculussig_85b6364b49363432.meta │ │ ├── oculussig_993526aa │ │ └── oculussig_993526aa.meta ├── Resources.meta ├── Resources │ ├── SceneBuildProperties.txt │ └── SceneBuildProperties.txt.meta ├── Test Driver.meta ├── Test Driver │ ├── Editor.meta │ ├── Editor │ │ ├── BuildOverride.cs │ │ ├── BuildOverride.cs.meta │ │ ├── SceneHelper.cs │ │ ├── SceneHelper.cs.meta │ │ ├── XRBuildSettings.cs │ │ ├── XRBuildSettings.cs.meta │ │ ├── XRPlatform.cs │ │ ├── XRPlatform.cs.meta │ │ ├── XRSdkDescription.cs │ │ ├── XRSdkDescription.cs.meta │ │ ├── XRTestConfigurationWindow.cs │ │ ├── XRTestConfigurationWindow.cs.meta │ │ ├── XRTestExportWindow.cs │ │ ├── XRTestExportWindow.cs.meta │ │ ├── XRTestSuiteConfiguration.cs │ │ ├── XRTestSuiteConfiguration.cs.meta │ │ ├── XRTestsWindow.cs │ │ └── XRTestsWindow.cs.meta │ ├── InputMobileForSceneChange.cs │ ├── InputMobileForSceneChange.cs.meta │ ├── TestDriver.cs │ └── TestDriver.cs.meta ├── Tests.meta └── Tests │ ├── Camera and TrackedPoseDriver.meta │ ├── Camera and TrackedPoseDriver │ ├── CameraAndTrackedPoseDriver.unity │ ├── CameraAndTrackedPoseDriver.unity.meta │ ├── TPDToText.cs │ └── TPDToText.cs.meta │ ├── Characteristics.meta │ ├── Characteristics │ ├── Characteristics.unity │ ├── Characteristics.unity.meta │ ├── InputDevicesConfigEvents.cs │ ├── InputDevicesConfigEvents.cs.meta │ ├── ListDevicesWithCharacteristics.cs │ ├── ListDevicesWithCharacteristics.cs.meta │ ├── ListInputDevicesRoles.cs │ └── ListInputDevicesRoles.cs.meta │ ├── Generic Buttons and Axes.meta │ ├── Generic Buttons and Axes │ ├── Generic Buttons and Axes.unity │ └── Generic Buttons and Axes.unity.meta │ ├── GetJoystickNames.meta │ ├── GetJoystickNames │ ├── GetJoystickNames.unity │ ├── GetJoystickNames.unity.meta │ ├── GetJoystickNamesToText.cs │ └── GetJoystickNamesToText.cs.meta │ ├── GetNodeNames.meta │ ├── GetNodeNames │ ├── GetNodeNames.unity │ ├── GetNodeNames.unity.meta │ ├── GetNodeNamesToText.cs │ └── GetNodeNamesToText.cs.meta │ ├── GetNodeStates.meta │ ├── GetNodeStates │ ├── GetNodeStates.unity │ └── GetNodeStates.unity.meta │ ├── HapticsTest.meta │ ├── HapticsTest │ ├── HapticsTest.unity │ ├── HapticsTest.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── ClipTests.meta │ │ ├── ClipTests │ │ ├── ClipTestButton.cs │ │ ├── ClipTestButton.cs.meta │ │ ├── DutyCycle_50.cs │ │ ├── DutyCycle_50.cs.meta │ │ ├── RampDown.cs │ │ ├── RampDown.cs.meta │ │ ├── RampUp.cs │ │ └── RampUp.cs.meta │ │ ├── HapticsStopButton.cs │ │ ├── HapticsStopButton.cs.meta │ │ ├── ImpulseTestButton.cs │ │ ├── ImpulseTestButton.cs.meta │ │ ├── SliderValueToText.cs │ │ ├── SliderValueToText.cs.meta │ │ ├── TextTimer.cs │ │ ├── TextTimer.cs.meta │ │ ├── VRInputCursor.cs │ │ ├── VRInputCursor.cs.meta │ │ ├── VRInputModule.cs │ │ ├── VRInputModule.cs.meta │ │ ├── XRInput.cs │ │ ├── XRInput.cs.meta │ │ ├── XRNodeCapabilities.cs │ │ ├── XRNodeCapabilities.cs.meta │ │ ├── XRNodeHapticsCapabilitiesSetsSliderExtents.cs │ │ └── XRNodeHapticsCapabilitiesSetsSliderExtents.cs.meta │ ├── HistoricInput.meta │ ├── HistoricInput │ ├── ControllerHistory.cs │ ├── ControllerHistory.cs.meta │ ├── HistoricInput.unity │ └── HistoricInput.unity.meta │ ├── InputDevices.meta │ ├── InputDevices │ ├── DeviceAtXRNode.cs │ ├── DeviceAtXRNode.cs.meta │ ├── InputDevices.unity │ ├── InputDevices.unity.meta │ ├── InputDevicesEventsToText.cs │ ├── InputDevicesEventsToText.cs.meta │ ├── ListDevicesAtNode.cs │ ├── ListDevicesAtNode.cs.meta │ ├── ListDevicesWithRole.cs │ ├── ListDevicesWithRole.cs.meta │ ├── ListInputDevices.cs │ └── ListInputDevices.cs.meta │ ├── NodeEvents.meta │ ├── NodeEvents │ ├── Node Events.unity │ ├── Node Events.unity.meta │ ├── NodeEventsToText.cs │ └── NodeEventsToText.cs.meta │ ├── SupportedAndLoadedDevices.meta │ ├── SupportedAndLoadedDevices │ ├── SupportedAndLoadedDevices.unity │ ├── SupportedAndLoadedDevices.unity.meta │ ├── SupportedAndLoadedDevicesToText.cs │ └── SupportedAndLoadedDevicesToText.cs.meta │ ├── Template.meta │ ├── Template │ ├── Template.unity │ └── Template.unity.meta │ ├── TrackingFeatures.meta │ ├── TrackingFeatures │ ├── GazeRecenter.cs │ ├── GazeRecenter.cs.meta │ ├── GazeTogglePosTracking.cs │ ├── GazeTogglePosTracking.cs.meta │ ├── TrackingFeatures.unity │ └── TrackingFeatures.unity.meta │ ├── Usages.meta │ ├── Usages │ ├── AxisRangeCheck.cs │ ├── AxisRangeCheck.cs.meta │ ├── AxisUsageProxy.cs │ ├── AxisUsageProxy.cs.meta │ ├── ButtonUsageProxy.cs │ ├── ButtonUsageProxy.cs.meta │ ├── DiscreteUsageProxy.cs │ ├── DiscreteUsageProxy.cs.meta │ ├── ListFeatureUsages.cs │ ├── ListFeatureUsages.cs.meta │ ├── QuaternionUsageProxy.cs │ ├── QuaternionUsageProxy.cs.meta │ ├── StickUsageProxy.cs │ ├── StickUsageProxy.cs.meta │ ├── Usages.unity │ ├── Usages.unity.meta │ ├── Vector3UsageProxy.cs │ └── Vector3UsageProxy.cs.meta │ ├── XRNodePhysicalTryGets.meta │ ├── XRNodePhysicalTryGets │ ├── XRNodePhysicalTryGets.unity │ └── XRNodePhysicalTryGets.unity.meta │ ├── _SharedAssets.meta │ └── _SharedAssets │ ├── FromFuncTests.meta │ ├── FromFuncTests │ ├── Billboard.cs │ ├── Billboard.cs.meta │ ├── GroundMaterial.mat │ ├── GroundMaterial.mat.meta │ ├── LightHalo.mat │ ├── LightHalo.mat.meta │ ├── LightHaloShader.shader │ ├── LightHaloShader.shader.meta │ ├── LookAt.cs │ ├── LookAt.cs.meta │ ├── Navigation.meta │ ├── Navigation │ │ ├── ArrowMaterial.mat │ │ ├── ArrowMaterial.mat.meta │ │ ├── ArrowShader.shader │ │ ├── ArrowShader.shader.meta │ │ ├── GazeMaterial.mat │ │ ├── GazeMaterial.mat.meta │ │ ├── GazeShader.shader │ │ ├── GazeShader.shader.meta │ │ ├── GazeSprite.cs │ │ ├── GazeSprite.cs.meta │ │ ├── Navigation.cs │ │ ├── Navigation.cs.meta │ │ ├── NavigationArrow.cs │ │ ├── NavigationArrow.cs.meta │ │ ├── NavigationArrows.prefab │ │ ├── NavigationArrows.prefab.meta │ │ ├── gazeSprite.psd │ │ └── gazeSprite.psd.meta │ ├── Orbit.cs │ ├── Orbit.cs.meta │ ├── RandomOrbit.cs │ ├── RandomOrbit.cs.meta │ ├── Scaler.cs │ ├── Scaler.cs.meta │ ├── Translate.cs │ ├── Translate.cs.meta │ ├── models.fbx │ └── models.fbx.meta │ ├── Materials.meta │ ├── Materials │ ├── Blue.mat │ ├── Blue.mat.meta │ ├── Green.mat │ ├── Green.mat.meta │ ├── Red.mat │ └── Red.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ ├── AccelerationRotor.prefab │ ├── AccelerationRotor.prefab.meta │ ├── AccelerationSphere.prefab │ ├── AccelerationSphere.prefab.meta │ ├── AceelSphere.prefab │ ├── AceelSphere.prefab.meta │ ├── AxisProxy.prefab │ ├── AxisProxy.prefab.meta │ ├── ButtonProxy.prefab │ ├── ButtonProxy.prefab.meta │ ├── DataVisualization.prefab │ ├── DataVisualization.prefab.meta │ ├── StickProxy.prefab │ ├── StickProxy.prefab.meta │ ├── TestDriver.prefab │ ├── TestDriver.prefab.meta │ ├── TestDriver_AR.prefab │ ├── TestDriver_AR.prefab.meta │ ├── VelocitySphere.prefab │ ├── VelocitySphere.prefab.meta │ ├── XRNodeTranslationRotationStates.prefab │ └── XRNodeTranslationRotationStates.prefab.meta │ ├── Scripts.meta │ └── Scripts │ ├── AxisProxy.cs │ ├── AxisProxy.cs.meta │ ├── ButtonProxy.cs │ ├── ButtonProxy.cs.meta │ ├── FloorOffset.cs │ ├── FloorOffset.cs.meta │ ├── FunctionalTest.cs │ ├── FunctionalTest.cs.meta │ ├── GetNodeStates.cs │ ├── GetNodeStates.cs.meta │ ├── NodeStateDisplay.cs │ ├── NodeStateDisplay.cs.meta │ ├── StickProxy.cs │ ├── StickProxy.cs.meta │ ├── TestInstructions.cs │ └── TestInstructions.cs.meta ├── CONTRIBUTING.md ├── Documentation ├── NavigatingScenes.png └── XRTestsPanel.png ├── LICENSE.md ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset.meta ├── UnityConnectSettings.asset ├── VFXManager.asset ├── XRPackageSettings.asset └── XRSettings.asset ├── README.md └── pull_request_template.md /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Ll]ogs/ 3 | [Tt]emp/ 4 | [Oo]bj/ 5 | [Bb]uild/ 6 | [Bb]uilds/ 7 | Assets/AssetStoreTools* 8 | .gradle/ 9 | 10 | # Don't include osig files in what will become a public repository 11 | Assets/Plugins.meta 12 | Assets/Plugins/ 13 | 14 | # Visual Studio cache directory 15 | .vs/ 16 | 17 | # Autogenerated VS/MD/Consulo solution and project files 18 | ExportedObj/ 19 | .consulo/ 20 | *.csproj 21 | *.unityproj 22 | *.sln 23 | *.suo 24 | *.tmp 25 | *.user 26 | *.userprefs 27 | *.pidb 28 | *.booproj 29 | *.svd 30 | *.pdb 31 | *.opendb 32 | 33 | # Unity3D generated meta files 34 | *.pidb.meta 35 | *.pdb.meta 36 | 37 | # Unity3D Generated File On Crash Reports 38 | sysinfo.txt 39 | 40 | # Builds 41 | *.apk 42 | *.unitypackage 43 | -------------------------------------------------------------------------------- /Assets/CreateTestDriver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CreateTestDriver : MonoBehaviour 6 | { 7 | public GameObject TestDriver; 8 | public GameObject TestDriver_AR; 9 | 10 | public bool AR; 11 | 12 | private void Awake() 13 | { 14 | if (GameObject.FindGameObjectWithTag("TestDriver") == null) 15 | { 16 | Debug.Log("Creating new test driver"); 17 | if (AR) 18 | Instantiate(TestDriver_AR); 19 | else 20 | Instantiate(TestDriver); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Assets/CreateTestDriver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25518e10b2d600041904b5db0fe7a854 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca16aafc195980b4098d80b259b4252b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Editor/XRInputDebugger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fa1fae3237c59a48bf145e3e66b70da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Original Omnibus.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13b7994a7bf13e241a5bf634a7e34041 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Original Omnibus/Omnibus.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2e19aec385c9284aa61de3cea3bbce3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Original Omnibus/XRPlatformToText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class XRPlatformToText : MonoBehaviour 9 | { 10 | public Text loadedDeviceText; 11 | public Text supportedDeviceText; 12 | public Text joystickNamesText; 13 | public Text eventsText; 14 | 15 | private Queue m_Events; 16 | private int m_QueueMaximumSize = 14; 17 | private int m_EventNumber = 0; 18 | 19 | private void Awake() 20 | { 21 | // Queue setup 22 | m_Events = new Queue(); 23 | } 24 | 25 | // Use this for initialization 26 | void Start() 27 | { 28 | string displayTextAccumulator; 29 | 30 | // Loaded device 31 | loadedDeviceText.text = XRSettings.loadedDeviceName; 32 | 33 | // Supported devices (this build) 34 | displayTextAccumulator = ""; 35 | foreach (string device in XRSettings.supportedDevices) 36 | { 37 | displayTextAccumulator += device + ", "; 38 | } 39 | supportedDeviceText.text = displayTextAccumulator; 40 | 41 | // Joystick names 42 | ShowJoystickNames(); 43 | } 44 | 45 | private void OnEnable() 46 | { 47 | InputTracking.nodeAdded += OnNodeAdded; 48 | InputTracking.nodeRemoved += OnNodeRemoved; 49 | InputTracking.trackingAcquired += OnTrackingAcquired; 50 | InputTracking.trackingLost += OnTrackingLost; 51 | } 52 | 53 | private void OnDisable() 54 | { 55 | InputTracking.nodeAdded -= OnNodeAdded; 56 | InputTracking.nodeRemoved -= OnNodeRemoved; 57 | InputTracking.trackingAcquired -= OnTrackingAcquired; 58 | InputTracking.trackingLost -= OnTrackingLost; 59 | } 60 | 61 | void OnNodeAdded(XRNodeState NodeState) 62 | { 63 | AddEventToQueue("NodeAdded: " + NodeState.nodeType); 64 | ShowJoystickNames(); 65 | } 66 | 67 | void OnNodeRemoved(XRNodeState NodeState) 68 | { 69 | AddEventToQueue("NodeRemoved: " + NodeState.nodeType); 70 | ShowJoystickNames(); 71 | } 72 | 73 | void OnTrackingAcquired(XRNodeState NodeState) 74 | { 75 | AddEventToQueue("TrackingAquired: " + NodeState.nodeType); 76 | } 77 | 78 | void OnTrackingLost(XRNodeState NodeState) 79 | { 80 | AddEventToQueue("TrackingLost: " + NodeState.nodeType); 81 | } 82 | 83 | void AddEventToQueue(string EventDescriptor) 84 | { 85 | string displayTextAccumulator = ""; 86 | 87 | EventDescriptor = "<" + m_EventNumber + "> " + EventDescriptor; 88 | m_EventNumber++; 89 | m_Events.Enqueue(EventDescriptor); 90 | 91 | while (m_Events.Count > m_QueueMaximumSize) 92 | { 93 | m_Events.Dequeue(); 94 | } 95 | 96 | // Print events 97 | foreach (string eventString in m_Events) 98 | { 99 | displayTextAccumulator = (eventString + "\n") + displayTextAccumulator; 100 | } 101 | eventsText.text = displayTextAccumulator; 102 | } 103 | 104 | void ShowJoystickNames() 105 | { 106 | string displayTextAccumulator = ""; 107 | int joystickNumber = 0; 108 | 109 | foreach (string device in Input.GetJoystickNames()) 110 | { 111 | displayTextAccumulator += ("<" + joystickNumber + "> " + device + "\n"); 112 | joystickNumber++; 113 | } 114 | joystickNamesText.text = displayTextAccumulator; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Assets/Original Omnibus/XRPlatformToText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2c55a5f79dca9e479301a7d9fbff31d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c08a0cd65df42c34bb1073305a56e632 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea7ff4212033b104287152607fa93b6b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41831b85a8ae4ac43a797de86c66002d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_1KWPH802GS8137: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/XRInputTests/6feb1b8ad451ed0a0de9bba58f74aebb782be47b/Assets/Plugins/Android/assets/oculussig_1KWPH802GS8137 -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_1KWPH802GS8137.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6709b3cf0427734ca29bf76b7138e46 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_5702c45d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/XRInputTests/6feb1b8ad451ed0a0de9bba58f74aebb782be47b/Assets/Plugins/Android/assets/oculussig_5702c45d -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_5702c45d.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1e8cee7c944678458891533ed4348a9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_85b6364b49363431: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/XRInputTests/6feb1b8ad451ed0a0de9bba58f74aebb782be47b/Assets/Plugins/Android/assets/oculussig_85b6364b49363431 -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_85b6364b49363431.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7466dfc697089cb4a9099e0ffb640955 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_85b6364b49363432: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/XRInputTests/6feb1b8ad451ed0a0de9bba58f74aebb782be47b/Assets/Plugins/Android/assets/oculussig_85b6364b49363432 -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_85b6364b49363432.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b8cdd3a1eddc634585d2713a26c24b2 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_993526aa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/XRInputTests/6feb1b8ad451ed0a0de9bba58f74aebb782be47b/Assets/Plugins/Android/assets/oculussig_993526aa -------------------------------------------------------------------------------- /Assets/Plugins/Android/assets/oculussig_993526aa.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14ec60a5c355a044ea3e9fa8372bd817 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45dd61a82cc35ab498dae82bdaf3950e 3 | folderAsset: yes 4 | timeCreated: 1521140608 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Resources/SceneBuildProperties.txt: -------------------------------------------------------------------------------- 1 | CameraAndTrackedPoseDriver0 2 | Characteristics0 3 | Generic Buttons and Axes0 4 | GetJoystickNames0 5 | GetNodeNames0 6 | GetNodeStates0 7 | HapticsTest0 8 | HistoricInput0 9 | InputDevices0 10 | Node Events0 11 | SupportedAndLoadedDevices0 12 | Template0 13 | TrackingFeatures0 14 | Usages0 15 | XRNodePhysicalTryGets0 16 | -------------------------------------------------------------------------------- /Assets/Resources/SceneBuildProperties.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd460d7ce37d13a4c92de1428c9e8e4c 3 | timeCreated: 1521140751 4 | licenseType: Pro 5 | TextScriptImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Test Driver.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e606f2cf52011bb4b878705c5c0f32f5 3 | folderAsset: yes 4 | timeCreated: 1521060136 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ffe56a7e8948f34ca65cef7306db614 3 | folderAsset: yes 4 | timeCreated: 1521138129 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/BuildOverride.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using System; 6 | using System.IO; 7 | using System.Linq; 8 | 9 | [InitializeOnLoad] 10 | public class BuildOverride : MonoBehaviour 11 | { 12 | public static bool override_build = true; 13 | 14 | public static void SetOverride(bool state) 15 | { 16 | override_build = state; 17 | if (override_build) 18 | { 19 | Action build_action = Build; 20 | BuildPlayerWindow.RegisterBuildPlayerHandler(build_action); 21 | } 22 | else 23 | { 24 | BuildPlayerWindow.RegisterBuildPlayerHandler(null); 25 | } 26 | } 27 | 28 | static BuildOverride() 29 | { 30 | SetOverride(true); 31 | } 32 | 33 | public static void Build(BuildPlayerOptions options) 34 | { 35 | if (!BuildPipeline.isBuildingPlayer) 36 | { 37 | BuildTarget target = options.target;// EditorUserBuildSettings.activeBuildTarget; 38 | 39 | if (options.locationPathName != "") 40 | { 41 | List scenes = new List(); 42 | foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes) 43 | { 44 | scenes.Add(scene.path); 45 | } 46 | 47 | //Output final build list 48 | string scene_list = ""; 49 | scenes.ForEach(s => scene_list = (scene_list + s + "\n")); 50 | Debug.Log("Building " + scenes.Count + " scenes to " + target + " at " + options.locationPathName + "\n" + scene_list); 51 | 52 | options.scenes = scenes.ToArray(); 53 | 54 | BuildPipeline.BuildPlayer(options); 55 | } 56 | } 57 | else 58 | { 59 | Debug.LogWarning("Unity is already building."); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/BuildOverride.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f18cf9bf9a3657d449daac03a31c67d7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/SceneHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEditor.SceneManagement; 5 | using UnityEngine; 6 | 7 | public class SceneHelper : AssetPostprocessor 8 | { 9 | public static void OpenTestScene(string scenePath) 10 | { 11 | EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single); 12 | } 13 | 14 | public static string[] GetTestScenePaths() 15 | { 16 | var guids = AssetDatabase.FindAssets("t:scene", new[] {"Assets/Tests"}); 17 | return guids.Select(AssetDatabase.GUIDToAssetPath).ToArray(); 18 | } 19 | 20 | public static void CreateNewTestScene() 21 | { 22 | EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single); 23 | RenderSettings.skybox = null; 24 | 25 | var anchor = new GameObject("Camera Anchor"); 26 | anchor.tag = "CameraAnchor"; 27 | 28 | var instructions = new GameObject("Instructions"); 29 | instructions.AddComponent(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/SceneHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b22e88ac4546ec4eb7be8fa23dce96a 3 | timeCreated: 1474915039 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRBuildSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEditor; 5 | using UnityEditor.Rendering; 6 | using UnityEngine; 7 | using UnityEngine.Rendering; 8 | 9 | public static class XRBuildSettings 10 | { 11 | public static void UpdateBuildSettings() 12 | { 13 | var currentIndex = Array.IndexOf(XRPlatform.allPlatforms, XRPlatform.currentPlatform); 14 | if (currentIndex < 0) 15 | currentIndex = 0; 16 | 17 | var xrTestSuiteConfiguration = new XRTestSuiteConfiguration 18 | { 19 | buildTarget = XRPlatform.allPlatforms[currentIndex].buildTarget, 20 | renderPath = ValidRenderingPaths()[CurrentRenderPathIndex()], 21 | stereoRenderingPath = PlayerSettings.stereoRenderingPath, 22 | stereoRendering = true, 23 | xrSdk = XRSdkDescription.currentSdk 24 | }; 25 | 26 | var scenes = new List(); 27 | scenes.AddRange(SceneHelper.GetTestScenePaths().Where(xrTestSuiteConfiguration.ShouldBuildTestScene)); 28 | EditorBuildSettings.scenes = scenes.Select(s => new EditorBuildSettingsScene {enabled = true, path = s}).ToArray(); 29 | AssetDatabase.SaveAssets(); 30 | } 31 | 32 | public static List ValidRenderingPaths() 33 | { 34 | var renderingPaths = Enum.GetValues(typeof(RenderingPath)).Cast().ToList(); 35 | renderingPaths.Remove(RenderingPath.UsePlayerSettings); 36 | return renderingPaths; 37 | } 38 | 39 | public static int CurrentRenderPathIndex() 40 | { 41 | var currentRenderingPath = 42 | EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, GraphicsTier.Tier3).renderingPath; 43 | return ValidRenderingPaths().IndexOf(currentRenderingPath); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRBuildSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fa41a683b426654a9e6e5e65271746c 3 | timeCreated: 1493065522 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRPlatform.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | /// 6 | /// Wrapper around the concept of a supported platform, providing us with a logical 7 | /// unit of the build target and build target group that's nicer to work with than 8 | /// plain enums. 9 | /// 10 | public class XRPlatform 11 | { 12 | static XRPlatform[] s_Platforms = new[] 13 | { 14 | new XRPlatform(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows), 15 | new XRPlatform(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64), 16 | new XRPlatform(BuildTargetGroup.Android, BuildTarget.Android), 17 | new XRPlatform(BuildTargetGroup.PS4, BuildTarget.PS4), 18 | new XRPlatform(BuildTargetGroup.iOS, BuildTarget.iOS), 19 | }; 20 | 21 | readonly BuildTargetGroup m_Group; 22 | readonly BuildTarget m_Target; 23 | 24 | public BuildTarget buildTarget 25 | { 26 | get { return m_Target; } 27 | } 28 | 29 | XRPlatform(BuildTargetGroup group, BuildTarget target) 30 | { 31 | m_Group = group; 32 | m_Target = target; 33 | } 34 | 35 | /// 36 | /// Returns the currently active platform. 37 | /// 38 | public static XRPlatform currentPlatform 39 | { 40 | get 41 | { 42 | foreach (var plat in s_Platforms) 43 | if (plat.IsActive()) 44 | return plat; 45 | return null; 46 | } 47 | } 48 | 49 | /// 50 | /// Returns all valid platforms. 51 | /// 52 | public static XRPlatform[] allPlatforms 53 | { 54 | get { return s_Platforms; } 55 | } 56 | 57 | /// 58 | /// Gets the GUIContent objects for all platforms. 59 | /// 60 | public static GUIContent[] allPlatformsGuiContents 61 | { 62 | get { return s_Platforms.Select(p => new GUIContent(p.ToString())).ToArray(); } 63 | } 64 | 65 | /// 66 | /// Returns the first platform that supports the given BuildTarget. 67 | /// 68 | /// The build target of the platform to find. 69 | /// The desired platform or null if no platform matches. 70 | public static XRPlatform GetPlatform(BuildTarget target) 71 | { 72 | foreach (var platform in s_Platforms) 73 | if (platform.m_Target == target) 74 | return platform; 75 | return null; 76 | } 77 | 78 | public void MakeActive() 79 | { 80 | if (!IsActive()) 81 | EditorUserBuildSettings.SwitchActiveBuildTarget(m_Group, m_Target); 82 | } 83 | 84 | bool IsActive() 85 | { 86 | return m_Target == EditorUserBuildSettings.activeBuildTarget; 87 | } 88 | 89 | public override string ToString() 90 | { 91 | return ObjectNames.NicifyVariableName(m_Target.ToString()); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRPlatform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6de3b92f565dc8f42bbe837ed491f387 3 | timeCreated: 1481911026 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRSdkDescription.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20ad27b8a6253024f8b83ccea9f4f92b 3 | timeCreated: 1481912687 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRTestConfigurationWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b678aa59f4559d4d80b6f8a835adbd5 3 | timeCreated: 1478108081 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRTestExportWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df0838e6e8ba8514fa1ad72de5d8e7c3 3 | timeCreated: 1493051568 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRTestSuiteConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Text; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | public class XRTestSuiteConfiguration 8 | { 9 | public BuildTarget buildTarget; 10 | public bool stereoRendering; 11 | public StereoRenderingPath stereoRenderingPath; 12 | public RenderingPath renderPath; 13 | public XRSdkDescription xrSdk; 14 | 15 | public override string ToString() 16 | { 17 | var sb = new StringBuilder(); 18 | 19 | sb.Append(buildTarget); 20 | sb.Append(xrSdk); 21 | 22 | if (stereoRendering) 23 | { 24 | sb.Append("_Stereo"); 25 | } 26 | 27 | if (stereoRenderingPath == StereoRenderingPath.SinglePass) 28 | { 29 | sb.Append("_SinglePass"); 30 | } 31 | if (stereoRenderingPath == StereoRenderingPath.MultiPass) 32 | { 33 | sb.Append("_Multipass"); 34 | } 35 | if (stereoRenderingPath == StereoRenderingPath.Instancing) 36 | { 37 | sb.Append("_Instancing"); 38 | } 39 | 40 | sb.Append(renderPath); 41 | 42 | return sb.ToString(); 43 | } 44 | 45 | public bool ShouldBuildTestScene(string scene) 46 | { 47 | var scenesToSkip = ScenesToSkipByPlatform().Concat(ScenesToSkipBySdk()); 48 | return !scenesToSkip.Contains(scene); 49 | } 50 | 51 | IEnumerable ScenesToSkipByPlatform() 52 | { 53 | // This function is a stub for now. 54 | // If it becomes useful again, use an if statement like this: 55 | // 56 | //if (buildTarget == BuildTarget.Android) 57 | //{ 58 | // return new[] 59 | // { 60 | // "Template" 61 | // }; 62 | //} 63 | 64 | return Enumerable.Empty(); 65 | } 66 | 67 | IEnumerable ScenesToSkipBySdk() 68 | { 69 | // This function is a stub for now. 70 | // If it becomes useful again, use an if statement like this: 71 | // 72 | //if (xrSdk != XRSdkDescription.s_Oculus) 73 | //{ 74 | // return new[] {"VRFocus"}; 75 | //} 76 | 77 | return new[] 78 | { 79 | "Assets/Tests/Template/Template.unity" 80 | }; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRTestSuiteConfiguration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33aced35b9735fd4dbe2bb2103f88429 3 | timeCreated: 1521138840 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Test Driver/Editor/XRTestsWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2e5d0aa22c785742ae8db5b1007db62 3 | timeCreated: 1475769232 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Test Driver/InputMobileForSceneChange.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class InputMobileForSceneChange 6 | { 7 | // Mobile input data 8 | private bool m_Dragging; 9 | private Vector2 m_TouchPoint, m_StartDrag, m_EndDrag; 10 | 11 | public void UpdateInputMobile(ref bool m_FlagMoveToPreviousScene, ref bool m_FlagMoveToNextScene) 12 | { 13 | Vector2 input_position = Vector2.zero; 14 | float swipe_threshold = 1f; 15 | bool input_down = false; 16 | bool input_state = false; 17 | bool input_up = false; 18 | 19 | //Touch-based input if controller is not connected. 20 | if (Input.touchSupported && Input.touchCount != 0) 21 | { 22 | input_down = Input.GetTouch(0).phase == TouchPhase.Began; 23 | input_up = Input.GetTouch(0).phase == TouchPhase.Ended; 24 | input_state = Input.GetTouch(0).phase == TouchPhase.Moved || Input.GetTouch(0).phase == TouchPhase.Stationary; 25 | input_position = Input.GetTouch(0).position; 26 | swipe_threshold = 10.0f; 27 | } 28 | else 29 | { 30 | input_position = Input.mousePosition; 31 | input_down = Input.GetMouseButtonDown(0); 32 | input_up = Input.GetMouseButtonUp(0); 33 | input_state = Input.GetMouseButton(0); 34 | swipe_threshold = 6f; 35 | } 36 | 37 | if (input_down) 38 | { 39 | m_TouchPoint = input_position; 40 | } 41 | else if (input_state) 42 | { 43 | if (input_position != m_TouchPoint && !m_Dragging) 44 | { 45 | m_Dragging = true; 46 | m_StartDrag = m_EndDrag = input_position; 47 | } 48 | else 49 | { 50 | m_EndDrag = input_position; 51 | } 52 | } 53 | else if (input_up) 54 | { 55 | if (m_Dragging) 56 | { 57 | m_Dragging = false; 58 | 59 | if (Mathf.Abs(m_StartDrag.x - m_EndDrag.x) > swipe_threshold) 60 | { 61 | if (m_StartDrag.x < m_EndDrag.x) 62 | { 63 | m_FlagMoveToPreviousScene = true; 64 | } 65 | else if (m_StartDrag.x > m_EndDrag.x) 66 | { 67 | m_FlagMoveToNextScene = true; 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/Test Driver/InputMobileForSceneChange.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00f545ef1491fcd45be0695c59df876f 3 | timeCreated: 1521133463 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Test Driver/TestDriver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.SceneManagement; 7 | 8 | // Start Scene must be Scene 0 in the build settings 9 | // To run a test in playmode, load both the start scene and a test scene. The test scene should be the active scene. 10 | // 11 | public class TestDriver : MonoBehaviour 12 | { 13 | public Text SceneNameText; 14 | public Text SceneDescriptionText; 15 | 16 | private int m_CurrentSceneIndex {get { return SceneManager.GetActiveScene().buildIndex; } set {} } 17 | 18 | private bool m_FlagMoveToNextScene; 19 | private bool m_FlagMoveToPreviousScene; 20 | 21 | private InputMobileForSceneChange m_InputMobileForSceneChange; 22 | 23 | private void Awake() 24 | { 25 | GameObject.DontDestroyOnLoad(gameObject); 26 | m_InputMobileForSceneChange = new InputMobileForSceneChange(); 27 | } 28 | 29 | private void OnEnable() 30 | { 31 | //if (m_CurrentSceneIndex == 0 && SceneManager.sceneCountInBuildSettings > 1) { LoadNextScene(); } 32 | SceneManager.sceneLoaded += OnSceneLoaded; 33 | } 34 | 35 | private void OnDisable() 36 | { 37 | SceneManager.sceneLoaded -= OnSceneLoaded; 38 | } 39 | 40 | private void Update() 41 | { 42 | UpdateInput(); 43 | 44 | if (m_FlagMoveToNextScene) { LoadNextScene(); } 45 | if (m_FlagMoveToPreviousScene) { LoadPreviousScene(); } 46 | } 47 | 48 | public void RunTest(int sceneIndex) 49 | { 50 | StartCoroutine(LoadSceneAsync(sceneIndex)); 51 | } 52 | 53 | private void LoadNextScene() 54 | { 55 | int nextLevel = (m_CurrentSceneIndex + 1) % (SceneManager.sceneCountInBuildSettings); 56 | 57 | RunTest(nextLevel); 58 | } 59 | 60 | private void LoadPreviousScene() 61 | { 62 | int previousLevel = m_CurrentSceneIndex - 1; 63 | if (previousLevel < 0) { previousLevel = SceneManager.sceneCountInBuildSettings - 1; } 64 | 65 | RunTest(previousLevel); 66 | } 67 | 68 | IEnumerator LoadSceneAsync(int sceneIndex) 69 | { 70 | yield return SceneManager.LoadSceneAsync(sceneIndex); 71 | } 72 | 73 | void OnSceneLoaded(Scene newlyLoadedScene, LoadSceneMode loadSceneMode) 74 | { 75 | MoveCameraToAnchor(); 76 | UpdateInstructionsUI(); 77 | } 78 | 79 | private void MoveCameraToAnchor() 80 | { 81 | GameObject anchor = GameObject.FindGameObjectWithTag("CameraAnchor"); 82 | if (anchor) 83 | { 84 | transform.position = anchor.transform.position; 85 | } 86 | } 87 | 88 | private void UpdateInstructionsUI() 89 | { 90 | SceneNameText.text = (m_CurrentSceneIndex + 1) + " / " + (SceneManager.sceneCountInBuildSettings) + " - " + SceneManager.GetActiveScene().name; 91 | 92 | GameObject SceneDescriptor = GameObject.FindGameObjectWithTag("TestInstructions"); 93 | 94 | if (SceneDescriptor != null) 95 | { 96 | SceneDescriptionText.text = SceneDescriptor.GetComponent().GetFullString(); 97 | } 98 | else 99 | { 100 | SceneDescriptionText.text = "No Scene Descriptive Text Found"; 101 | } 102 | } 103 | 104 | private void UpdateInput() 105 | { 106 | m_FlagMoveToNextScene = m_FlagMoveToPreviousScene = false; 107 | 108 | if (Application.isMobilePlatform) 109 | { 110 | m_InputMobileForSceneChange.UpdateInputMobile(ref m_FlagMoveToNextScene, ref m_FlagMoveToPreviousScene); 111 | } 112 | else if (Application.isConsolePlatform) 113 | { 114 | m_FlagMoveToNextScene = Input.GetAxis("Right Trigger") > 0.5f; 115 | m_FlagMoveToPreviousScene = Input.GetAxis("Left Trigger") > 0.5f; 116 | } 117 | else 118 | { 119 | m_FlagMoveToNextScene = Input.GetKeyDown(KeyCode.RightArrow); 120 | m_FlagMoveToPreviousScene = Input.GetKeyDown(KeyCode.LeftArrow); 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /Assets/Test Driver/TestDriver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4c49c0a7a259064eb2dcabc61546d0d 3 | timeCreated: 1521061046 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaeccf96c7733714db9ce10ebb8d296e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tests/Camera and TrackedPoseDriver.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d33e5a9b296c7a4285fee6a024c3870 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tests/Camera and TrackedPoseDriver/CameraAndTrackedPoseDriver.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a67d7d8f60284cc45910fd2181852fae 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/Camera and TrackedPoseDriver/TPDToText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.SpatialTracking; 6 | 7 | [RequireComponent(typeof(TrackedPoseDriver))] 8 | public class TPDToText : MonoBehaviour 9 | { 10 | public TextMesh LabelText; 11 | 12 | // Use this for initialization 13 | void Start() 14 | { 15 | TrackedPoseDriver tpd = GetComponent(); 16 | 17 | LabelText.text = tpd.deviceType.ToString() + ": " + tpd.poseSource.ToString(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Tests/Camera and TrackedPoseDriver/TPDToText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc36fce06ac7ac9459598c676d29e82f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a51f2a8e9aed8d44498796ea880efc8b 3 | folderAsset: yes 4 | timeCreated: 1521146792 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/Characteristics.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 581b3d1bd4053194d8a402e82d4ca5e2 3 | timeCreated: 1513026044 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/InputDevicesConfigEvents.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class InputDevicesConfigEvents : MonoBehaviour 9 | { 10 | public Text eventsText; 11 | public int m_QueueMaximumSize = 20; 12 | [Tooltip("After the queue is full, no longer accept new values.")] 13 | public bool fillQueueOnlyOnce = false; 14 | 15 | private Queue m_Events; 16 | private int m_EventNumber = 0; 17 | 18 | private void Awake() 19 | { 20 | // Queue setup 21 | m_Events = new Queue(); 22 | } 23 | 24 | private void OnEnable() 25 | { 26 | InputDevices.deviceConfigChanged += OnDeviceConfigChanged; 27 | } 28 | 29 | private void OnDisable() 30 | { 31 | InputDevices.deviceConfigChanged -= OnDeviceConfigChanged; 32 | } 33 | 34 | void OnDeviceConfigChanged(InputDevice device) 35 | { 36 | AddEventToQueue("OnDeviceConfigChanged: " + device.name); 37 | } 38 | 39 | void AddEventToQueue(string EventDescriptor) 40 | { 41 | if (fillQueueOnlyOnce && (m_EventNumber >= m_QueueMaximumSize)) 42 | { 43 | return; 44 | } 45 | 46 | string displayTextAccumulator = ""; 47 | 48 | EventDescriptor = "<" + m_EventNumber + "> " + EventDescriptor; 49 | m_EventNumber++; 50 | m_Events.Enqueue(EventDescriptor); 51 | 52 | while (m_Events.Count > m_QueueMaximumSize) 53 | { 54 | m_Events.Dequeue(); 55 | } 56 | 57 | // Print events 58 | foreach (string eventString in m_Events) 59 | { 60 | displayTextAccumulator = (eventString + "\n") + displayTextAccumulator; 61 | } 62 | eventsText.text = displayTextAccumulator; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/InputDevicesConfigEvents.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 943dbab65c818eb46aafdddf04165787 3 | timeCreated: 1521050505 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/ListDevicesWithCharacteristics.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class ListDevicesWithCharacteristics : MonoBehaviour 9 | { 10 | public Text listText; 11 | public InputDeviceCharacteristics characteristics; 12 | 13 | void Start() 14 | { 15 | ShowDeviceNames(); 16 | StartCoroutine("UpdateInputDeviceListEveryDelay", 3); 17 | } 18 | 19 | IEnumerator UpdateInputDeviceListEveryDelay(float delayInSeconds) 20 | { 21 | yield return new WaitForSeconds(delayInSeconds); 22 | 23 | ShowDeviceNames(); 24 | StartCoroutine("UpdateInputDeviceListEveryDelay", delayInSeconds); 25 | } 26 | 27 | void ShowDeviceNames() 28 | { 29 | string displayTextAccumulator = characteristics + ": "; 30 | 31 | List inputDevices = new List(); 32 | InputDevices.GetDevicesWithCharacteristics(characteristics, inputDevices); 33 | 34 | foreach (InputDevice device in inputDevices) 35 | { 36 | displayTextAccumulator += (device.name + ", "); 37 | } 38 | listText.text = displayTextAccumulator; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/ListDevicesWithCharacteristics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a95486e31bd94bb4293f9aaf033f051f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/ListInputDevicesRoles.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class ListInputDevicesRoles : MonoBehaviour 9 | { 10 | public Text nodeNamesText; 11 | 12 | void Start() 13 | { 14 | ShowNodeNames(); 15 | StartCoroutine("UpdateInputDeviceListEveryDelay", 3); 16 | } 17 | 18 | IEnumerator UpdateInputDeviceListEveryDelay(float delayInSeconds) 19 | { 20 | yield return new WaitForSeconds(delayInSeconds); 21 | 22 | ShowNodeNames(); 23 | StartCoroutine("UpdateInputDeviceListEveryDelay", delayInSeconds); 24 | } 25 | 26 | void ShowNodeNames() 27 | { 28 | string displayTextAccumulator = ""; 29 | int nodeNumber = 0; 30 | 31 | List inputDevices = new List(); 32 | InputDevices.GetDevices(inputDevices); 33 | 34 | foreach (InputDevice device in inputDevices) 35 | { 36 | displayTextAccumulator += ("<" + nodeNumber + "> " + " - Name: \"" + device.name + "\" - Characteristics: \"" + device.characteristics); 37 | 38 | displayTextAccumulator += "\"\n"; 39 | nodeNumber++; 40 | } 41 | nodeNamesText.text = displayTextAccumulator; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/Tests/Characteristics/ListInputDevicesRoles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 253f55409455ea844bcaa304115803e2 3 | timeCreated: 1521048573 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Tests/Generic Buttons and Axes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5e919dc8a82b5c43ad7e6c826bc2c32 3 | folderAsset: yes 4 | timeCreated: 1521047193 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/Generic Buttons and Axes/Generic Buttons and Axes.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cd2588c7d7c1c4459ef8df9c388e710 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/GetJoystickNames.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70f711a19310fb745b2ffb5d4a765236 3 | folderAsset: yes 4 | timeCreated: 1521048511 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/GetJoystickNames/GetJoystickNames.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77f8ffdeb028d6444adf511dcaecf2a5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/GetJoystickNames/GetJoystickNamesToText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class GetJoystickNamesToText : MonoBehaviour 9 | { 10 | public Text joystickNamesText; 11 | 12 | void Start() 13 | { 14 | ShowJoystickNames(); 15 | StartCoroutine("UpdateJoystickNamesEveryDelay", 3); 16 | } 17 | 18 | IEnumerator UpdateJoystickNamesEveryDelay(float delayInSeconds) 19 | { 20 | yield return new WaitForSeconds(delayInSeconds); 21 | 22 | ShowJoystickNames(); 23 | StartCoroutine("UpdateJoystickNamesEveryDelay", delayInSeconds); 24 | } 25 | 26 | void ShowJoystickNames() 27 | { 28 | string displayTextAccumulator = ""; 29 | int joystickNumber = 0; 30 | 31 | foreach (string device in Input.GetJoystickNames()) 32 | { 33 | displayTextAccumulator += ("<" + joystickNumber + "> " + device + "\n"); 34 | joystickNumber++; 35 | } 36 | joystickNamesText.text = displayTextAccumulator; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Tests/GetJoystickNames/GetJoystickNamesToText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 022efda111f7db54a894085d0433291a 3 | timeCreated: 1521048573 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeNames.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f42ae3e8991270c49be2f7ed246bad8b 3 | folderAsset: yes 4 | timeCreated: 1521146792 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeNames/GetNodeNames.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e149b8637eb0ea24ab44fcdcc9df4de7 3 | timeCreated: 1513026044 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeNames/GetNodeNamesToText.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.UI; 6 | using UnityEngine.XR; 7 | 8 | public class GetNodeNamesToText : MonoBehaviour 9 | { 10 | public Text nodeNamesText; 11 | 12 | void Start() 13 | { 14 | ShowNodeNames(); 15 | StartCoroutine("UpdateNodeNamesEveryDelay", 3); 16 | } 17 | 18 | IEnumerator UpdateNodeNamesEveryDelay(float delayInSeconds) 19 | { 20 | yield return new WaitForSeconds(delayInSeconds); 21 | 22 | ShowNodeNames(); 23 | StartCoroutine("UpdateNodeNamesEveryDelay", delayInSeconds); 24 | } 25 | 26 | void ShowNodeNames() 27 | { 28 | string displayTextAccumulator = ""; 29 | int nodeNumber = 0; 30 | 31 | List nodeStates = new List(); 32 | InputTracking.GetNodeStates(nodeStates); 33 | 34 | foreach (XRNodeState node in nodeStates) 35 | { 36 | displayTextAccumulator += ("<" + nodeNumber + "> " + node.nodeType + " - \"" + InputTracking.GetNodeName(node.uniqueID) + "\"\n"); 37 | nodeNumber++; 38 | } 39 | nodeNamesText.text = displayTextAccumulator; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeNames/GetNodeNamesToText.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b66a0182402ce254e945e44852db49de 3 | timeCreated: 1521048573 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeStates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47dac0bc8a6fc334db880e23c4699dde 3 | folderAsset: yes 4 | timeCreated: 1521045224 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/GetNodeStates/GetNodeStates.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 416f832233ac2924692218249238946d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/HapticsTest.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a16de2a25423c04588a447fce5c3ae3 3 | folderAsset: yes 4 | timeCreated: 1521146792 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Tests/HapticsTest/HapticsTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbb4335795648de4fbd726552402e720 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/HapticsTest/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f082c9684df1b994888b04b2fb1c325d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tests/HapticsTest/Scripts/ClipTests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d977281d2eb961f4fb780d0e0a22a216 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tests/HapticsTest/Scripts/ClipTests/ClipTestButton.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | using UnityEngine.XR; 6 | using UnityEngine.UI; 7 | 8 | [RequireComponent(typeof(Button))] 9 | public class ClipTestButton : MonoBehaviour 10 | { 11 | private byte[] m_LeftClip = null; 12 | private byte[] m_RightClip = null; 13 | 14 | // Update is called once per frame 15 | void OnEnable() 16 | { 17 | GetComponent