├── .github ├── dependabot.yml └── workflows │ ├── build-release.yml │ ├── bump-version.yml │ └── trigger-build-listing.yml ├── .gitignore ├── Dependencies.meta ├── Dependencies ├── Valve OpenXR.meta └── Valve OpenXR │ ├── CHANGELOG.md │ ├── CHANGELOG.md.meta │ ├── Editor.meta │ ├── Editor │ ├── OpenVRBuildProcessor.cs │ ├── OpenVRBuildProcessor.cs.meta │ ├── OpenVRLoaderMetadata.cs │ ├── OpenVRLoaderMetadata.cs.meta │ ├── OpenVRSettingsCopier.cs │ ├── OpenVRSettingsCopier.cs.meta │ ├── OpenVRSettingsEditor.cs │ └── OpenVRSettingsEditor.cs.meta │ ├── LICENSE.md │ ├── LICENSE.md.meta │ ├── README.md │ ├── README.md.meta │ ├── Runtime.meta │ ├── Runtime │ ├── DeviceLayouts.cs │ ├── DeviceLayouts.cs.meta │ ├── OpenVREvents.cs │ ├── OpenVREvents.cs.meta │ ├── OpenVRHelpers.cs │ ├── OpenVRHelpers.cs.meta │ ├── OpenVRLoader.cs │ ├── OpenVRLoader.cs.meta │ ├── OpenVRSettings.cs │ ├── OpenVRSettings.cs.meta │ ├── Unity.XR.OpenVR.asmdef │ ├── Unity.XR.OpenVR.asmdef.meta │ ├── UnitySubsystemsManifest.json │ ├── UnitySubsystemsManifest.json.meta │ ├── openvr_api.cs │ ├── openvr_api.cs.meta │ ├── x64.meta │ ├── x64 │ │ ├── XRSDKOpenVR.dll │ │ ├── XRSDKOpenVR.dll.meta │ │ ├── XRSDKOpenVR.dll.sig │ │ ├── XRSDKOpenVR.dll.sig.meta │ │ ├── XRSDKOpenVR.exp │ │ ├── XRSDKOpenVR.exp.meta │ │ ├── XRSDKOpenVR.lib │ │ ├── XRSDKOpenVR.lib.meta │ │ ├── libXRSDKOpenVR.so │ │ ├── libXRSDKOpenVR.so.meta │ │ ├── libopenvr_api.so │ │ ├── libopenvr_api.so.dbg │ │ ├── libopenvr_api.so.dbg.meta │ │ ├── libopenvr_api.so.meta │ │ ├── openvr_api.dll │ │ ├── openvr_api.dll.meta │ │ ├── openvr_api.dll.sig │ │ ├── openvr_api.dll.sig.meta │ │ ├── openvr_api.lib │ │ ├── openvr_api.lib.meta │ │ ├── ucrtbased.dll │ │ └── ucrtbased.dll.meta │ ├── x86.meta │ └── x86 │ │ ├── XRSDKOpenVR.dll │ │ ├── XRSDKOpenVR.dll.meta │ │ ├── XRSDKOpenVR.dll.sig │ │ ├── XRSDKOpenVR.dll.sig.meta │ │ ├── XRSDKOpenVR.exp │ │ ├── XRSDKOpenVR.exp.meta │ │ ├── XRSDKOpenVR.lib │ │ ├── XRSDKOpenVR.lib.meta │ │ ├── libopenvr_api.so │ │ ├── libopenvr_api.so.dbg │ │ ├── libopenvr_api.so.dbg.meta │ │ ├── libopenvr_api.so.meta │ │ ├── openvr_api.dll │ │ ├── openvr_api.dll.meta │ │ ├── openvr_api.dll.sig │ │ ├── openvr_api.dll.sig.meta │ │ ├── openvr_api.lib │ │ ├── openvr_api.lib.meta │ │ ├── ucrtbased.dll │ │ └── ucrtbased.dll.meta │ ├── package.json │ └── package.json.meta ├── Docs.meta ├── Docs ├── base_component.png ├── base_component.png.meta ├── tracker_component.png └── tracker_component.png.meta ├── Editor.meta ├── Editor ├── AvatarBuildHook.cs ├── AvatarBuildHook.cs.meta ├── Base.cs ├── Base.cs.meta ├── BaseEditor.cs ├── BaseEditor.cs.meta ├── SteamVR.meta ├── SteamVR │ ├── TrackedDevices.cs │ └── TrackedDevices.cs.meta ├── Tracker.cs ├── Tracker.cs.meta ├── TrackerEditor.cs ├── TrackerEditor.cs.meta ├── Utilities.cs ├── Utilities.cs.meta ├── Utility.meta ├── Utility │ ├── Axe.cs │ ├── Axe.cs.meta │ ├── Input.cs │ ├── Input.cs.meta │ ├── RegistryReader.cs │ ├── RegistryReader.cs.meta │ ├── UnityHelper.cs │ └── UnityHelper.cs.meta ├── VRChat.meta ├── VRChat │ ├── ExpressionMenu.cs │ ├── ExpressionMenu.cs.meta │ ├── PlayerHeights.cs │ └── PlayerHeights.cs.meta ├── hackebein.objecttracking.Editor.asmdef └── hackebein.objecttracking.Editor.asmdef.meta ├── LICENSE ├── LICENSE.meta ├── Prefab.meta ├── Prefab ├── ByModelNumber.meta ├── ByModelNumber │ ├── logitech_raw_stylus_v4_0.fbx │ ├── logitech_raw_stylus_v4_0.fbx.meta │ ├── tundra_tracker.fbx │ ├── tundra_tracker.fbx.meta │ ├── vive_tracker_3_0_mv.fbx │ ├── vive_tracker_3_0_mv.fbx.meta │ ├── vive_tracker_mv.fbx │ ├── vive_tracker_mv.fbx.meta │ ├── vive_tracker_pro_mv.fbx │ ├── vive_tracker_pro_mv.fbx.meta │ ├── vive_tracker_pvt.fbx │ └── vive_tracker_pvt.fbx.meta ├── Gizmo.fbx ├── Gizmo.fbx.meta ├── GizmoUnity.fbx ├── GizmoUnity.fbx.meta ├── HTC Vive 2.0.fbx ├── HTC Vive 2.0.fbx.meta ├── HTC Vive 3.0.fbx ├── HTC Vive 3.0.fbx.meta ├── Logitech VR Ink Stylus.fbx ├── Logitech VR Ink Stylus.fbx.meta ├── MissingModels.md ├── MissingModels.md.meta ├── Tundra Labs Tundra Tracker screw rotated.fbx ├── Tundra Labs Tundra Tracker screw rotated.fbx.meta ├── Tundra Labs Tundra Tracker screw.fbx ├── Tundra Labs Tundra Tracker screw.fbx.meta ├── Tundra Labs Tundra Tracker strap.fbx ├── Tundra Labs Tundra Tracker strap.fbx.meta ├── Tundra Labs Tundra Tracker.fbx └── Tundra Labs Tundra Tracker.fbx.meta ├── README.md ├── README.md.meta ├── package.json └── package.json.meta /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | groups: 8 | all-github-actions: 9 | patterns: 10 | - "*" -------------------------------------------------------------------------------- /.github/workflows/build-release.yml: -------------------------------------------------------------------------------- 1 | name: Build Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*.*.*" 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | steps: 14 | 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | with: 18 | persist-credentials: false 19 | fetch-depth: 0 20 | 21 | - name: Get Name 22 | id: name 23 | uses: zoexx/github-action-json-file-properties@d02f28167f05bf70cd75352b11c25a4e8c39bf38 24 | with: 25 | file_path: package.json 26 | prop_path: name 27 | 28 | - name: Get Version 29 | id: version 30 | uses: zoexx/github-action-json-file-properties@d02f28167f05bf70cd75352b11c25a4e8c39bf38 31 | with: 32 | file_path: package.json 33 | prop_path: version 34 | 35 | - name: Set Environment Variables 36 | run: | 37 | echo "zipFile=${{ steps.name.outputs.value }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV 38 | echo "unityPackage=${{ steps.name.outputs.value }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV 39 | echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV 40 | 41 | - name: Create Unity Folder Structure 42 | run: | 43 | mkdir -p Packages/${{ steps.name.outputs.value }} 44 | rsync -av \ 45 | --exclude='.*' \ 46 | --exclude='Packages/${{ steps.name.outputs.value }}' \ 47 | . Packages/${{ steps.name.outputs.value }} 48 | 49 | # *.unitypackage 50 | - name: Track Package Meta Files 51 | run: find Packages/${{ steps.name.outputs.value }} -name \*.meta > metaList 52 | 53 | - name: Create UnityPackage 54 | uses: pCYSl5EDgo/create-unitypackage@b5c57408698b1fab8b3a84d4b67f767b8b7c0be9 55 | with: 56 | package-path: ${{ env.unityPackage }} 57 | include-files: metaList 58 | 59 | # *.zip 60 | - name: Create Package Zip 61 | run: | 62 | cd Packages/${{ steps.name.outputs.value }} 63 | find . -name \*.meta | sed 'p;s/\.meta$//' > fileList 64 | zip -r ../../${{ env.zipFile }} . -i @fileList 65 | 66 | # Publish the Release to GitHub 67 | - name: Make Release 68 | uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda 69 | with: 70 | files: | 71 | ${{ env.zipFile }} 72 | ${{ env.unityPackage }} 73 | ${{ env.packagePath }}/package.json 74 | tag_name: ${{ env.version }} 75 | token: ${{ secrets.TOKEN }} 76 | draft: true 77 | generate_release_notes: true 78 | -------------------------------------------------------------------------------- /.github/workflows/bump-version.yml: -------------------------------------------------------------------------------- 1 | name: Bump Version 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version: 7 | description: 'Version number' 8 | required: true 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | contents: write 15 | steps: 16 | 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | persist-credentials: false 21 | fetch-depth: 0 22 | 23 | - name: Update package.json 24 | uses: jossef/action-set-json-field@890d7642122dbb2833dddd2003659bb71a2b21fe 25 | with: 26 | file: package.json 27 | field: version 28 | value: ${{ github.event.inputs.version }} 29 | 30 | - name: Commit changes 31 | run: | 32 | git config --local user.email "github-actions[bot]@users.noreply.github.com" 33 | git config --local user.name "github-actions[bot]" 34 | git commit -am "Bump version to ${{ github.event.inputs.version }}" 35 | git tag -a ${{ github.event.inputs.version }} -m "Version ${{ github.event.inputs.version }}" 36 | 37 | - name: Push changes 38 | uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa 39 | with: 40 | github_token: ${{ secrets.TOKEN }} 41 | tags: true -------------------------------------------------------------------------------- /.github/workflows/trigger-build-listing.yml: -------------------------------------------------------------------------------- 1 | name: Trigger building Repo Listing 2 | 3 | env: 4 | listPublishDirectory: Website 5 | pathToCi: ci 6 | 7 | on: 8 | release: 9 | types: [published, unpublished, created, edited, deleted] 10 | workflow_dispatch: 11 | 12 | jobs: 13 | dispatch: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/github-script@v7 17 | with: 18 | github-token: ${{ secrets.TOKEN }} 19 | script: | 20 | await github.rest.actions.createWorkflowDispatch({ 21 | owner: 'hackebein', 22 | repo: 'VPM-Listing', 23 | workflow_id: 'build-listing.yml', 24 | ref: 'main', 25 | }) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | -------------------------------------------------------------------------------- /Dependencies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33b82f403baef1546bce730d2f3eecba 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30c3c7f6ea983934a906f6a01d13d133 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this package will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | ## [1.2.1] - 2024-01-11 8 | ### Changed 9 | - Updated to SteamVR SDK 2.0.10 10 | 11 | ## [1.2.0] - 2023-08-24 12 | ### Added 13 | - Added limited OpenGL support (multipass only) 14 | ### Changed 15 | - Updated to SteamVR SDK 1.26.7 16 | - Fix for unity projects set to binary serialization 17 | - Fix for unnecessary preinit #80 18 | - Fix for incorrect reporting of eye position #86 19 | - Fix for broken depth textures in some situations #110 20 | - Fix for multipass not working on some render pipelines 21 | 22 | ## [1.1.5] - 2021-11-08 23 | ### Changed 24 | - Fixed issue with unicode paths / project names not working #108 25 | 26 | ## [1.1.4] - 2021-01-07 27 | ### Changed 28 | - Refixed issue with general builds crashing #52 29 | 30 | ## [1.1.3] - 2020-12-31 31 | ### Changed 32 | - Fixed issue with x86 builds crashing 33 | - Fixed issue with general builds crashing #52 34 | - Fixed issues with dll metadata not being correct for some platforms. #33 #71 35 | 36 | ## [1.1.1] - 2020-12-11 37 | ### Added 38 | - Added Refresh Rate info to HMD 39 | - Added User Presence feature to HMD 40 | ### Changed 41 | - Fixed a bug when autoenabling the loader 42 | - Moved common stats to the default accessors 43 | - Fixed events not always being forwarded when using the SteamVR Unity Plugin 44 | - Fixed depth texture support 45 | - Cleaned up device layouts to stop suggesting we support them. 46 | - Fixed support for overlay applications. They were trying to use scene-app-only APIs 47 | - Closing xr settings window when open to avoid data corruption 48 | - Fixed graphicsAdapterId reporting (laptops should use the correct graphics card) 49 | 50 | ## [1.0.1] - 2020-08-03 51 | ### Changed 52 | - Updating version of legacyinputhelpers 53 | 54 | ## [1.0.0-preview.11] - 2020-07-28 55 | ### Changed 56 | - Misc fixes to support linux builds. Linux is still WIP but these fixes affect the windows builds too. 57 | 58 | ## [1.0.0-preview.10] - 2020-07-22 59 | ### Changed 60 | - Fixing gitignore for some pdb meta files 61 | 62 | ## [1.0.0-preview.9] - 2020-07-22 63 | ### Changed 64 | - Statically linking vs debug runtime so people without vs can use the debug dlls 65 | 66 | ## [1.0.0-preview.8] - 2020-07-22 67 | ### Changed 68 | - Adding supporting debug dlls 69 | 70 | ## [1.0.0-preview.7] - 2020-07-21 71 | ### Changed 72 | - Requiring version 3.2.13 of the XR Management package due to critical errors in previous versions. 73 | 74 | ## [1.0.0-preview.6] - 2020-07-17 75 | ### Changed 76 | - Adding some subsystem failure cases to TrackingOrigin queries 77 | - Switching to debug dlls. If you would like release DLLs either wait for v1.0 or build them from source. 78 | 79 | ## [1.0.0-preview.5] - 2020-07-15 80 | ### Changed 81 | - Fixed 32bit builds 82 | - Fixed UWP builds 83 | - Fixed IL2CPP builds 84 | - Fixed some issues with Mirror View Mode. Now defaulting to Right Eye instead of OpenVR. 85 | - Fixed issue where SteamVR Beta was required. 86 | 87 | ## [1.0.0-preview.4] - 2020-06-24 88 | ### Changed 89 | - Switched from legacy input (Unity XR) to SteamVR Input via the SteamVR Unity Plugin for controller state processing 90 | - Renamed package from com.valve.openvr to com.valvesoftware.unity.openvr 91 | - Fixed some pathing issues with action manifests 92 | - Fixed some rendering issues 93 | 94 | ## [1.0.0-preview.3] - 2020-06-24 95 | ### Added 96 | - Added NPM support 97 | - Added some extra logging 98 | - Added support for Unity 2019.4 99 | 100 | ### Changed 101 | - Renamed package from com.valve.openvr to com.valvesoftware.unity.openvr 102 | - Fixed some pathing issues with action manifests 103 | - Fixed some rendering issues 104 | 105 | ## Removed 106 | - Legacy Input support. To get input for now you'll need to use the SteamVR Unity Plugin. 107 | 108 | ## [1.0.0-preview.2] - 2020-04-29 109 | ### Added 110 | - Fixed some of the layouts, a fix for a black screen issue 111 | 112 | ## [1.0.0-preview.1] - 2020-04-29 113 | ### Added 114 | - Initial beta release -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc1e49dea544a08409ba1970c98a82e9 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0f50efec93df0b4882894bc213428c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRBuildProcessor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using UnityEditor.Build; 6 | using UnityEditor.Build.Reporting; 7 | 8 | #if UNITY_XR_MANAGEMENT 9 | using UnityEngine.XR; 10 | using UnityEngine.Experimental.XR; 11 | using UnityEngine.XR.Management; 12 | using UnityEditor.XR.Management; 13 | 14 | namespace Unity.XR.OpenVR 15 | { 16 | public class OpenVRBuildProcessor : IPreprocessBuildWithReport 17 | { 18 | private readonly string[] runtimePluginNames = new string[] 19 | { 20 | "XRSDKOpenVR", 21 | "openvr_api", 22 | "vc14", 23 | }; 24 | 25 | public int callbackOrder { get; set; } 26 | 27 | public bool ShouldIncludeRuntimePluginsInBuild(string path) 28 | { 29 | XRGeneralSettings generalSettings = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget)); 30 | if (generalSettings == null) 31 | return false; 32 | 33 | foreach (var loader in generalSettings.Manager.loaders) 34 | { 35 | if (loader is OpenVRLoader) 36 | return true; 37 | } 38 | return false; 39 | } 40 | 41 | public void OnPreprocessBuild(BuildReport report) 42 | { 43 | var allPlugins = PluginImporter.GetAllImporters(); 44 | foreach (var plugin in allPlugins) 45 | { 46 | if (plugin.isNativePlugin) 47 | { 48 | foreach (var pluginName in runtimePluginNames) 49 | { 50 | if (plugin.assetPath.Contains(pluginName)) 51 | { 52 | plugin.SetIncludeInBuildDelegate(ShouldIncludeRuntimePluginsInBuild); 53 | break; 54 | } 55 | } 56 | } 57 | } 58 | } 59 | } 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRBuildProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5318268ec1124a842aede4e7aff44005 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRLoaderMetadata.cs: -------------------------------------------------------------------------------- 1 | #if XR_MGMT_GTE_320 2 | 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using Unity.XR.OpenVR; 6 | using UnityEditor; 7 | using UnityEngine; 8 | using UnityEngine.XR.Management; 9 | using UnityEditor.XR.Management.Metadata; 10 | 11 | class OpenVRPackage : IXRPackage 12 | { 13 | private class OpenVRLoaderMetadata : IXRLoaderMetadata 14 | { 15 | public string loaderName { get; set; } 16 | public string loaderType { get; set; } 17 | public List supportedBuildTargets { get; set; } 18 | } 19 | 20 | private class OpenVRPackageMetadata : IXRPackageMetadata 21 | { 22 | public string packageName { get; set; } 23 | public string packageId { get; set; } 24 | public string settingsType { get; set; } 25 | public List loaderMetadata { get; set; } 26 | } 27 | 28 | private static IXRPackageMetadata s_Metadata = new OpenVRPackageMetadata() 29 | { 30 | packageName = "OpenVR XR Plugin", 31 | packageId = "com.valvesoftware.unity.openvr", 32 | settingsType = "Unity.XR.OpenVR.OpenVRSettings", 33 | loaderMetadata = new List() { 34 | new OpenVRLoaderMetadata() { 35 | loaderName = "OpenVR Loader", 36 | loaderType = "Unity.XR.OpenVR.OpenVRLoader", 37 | supportedBuildTargets = new List() { 38 | BuildTargetGroup.Standalone 39 | } 40 | }, 41 | } 42 | }; 43 | 44 | public IXRPackageMetadata metadata => s_Metadata; 45 | 46 | public bool PopulateNewSettingsInstance(ScriptableObject obj) 47 | { 48 | OpenVRSettings packageSettings = obj as OpenVRSettings; 49 | if (packageSettings != null) 50 | { 51 | 52 | // Do something here if you need to... 53 | } 54 | return true; 55 | 56 | } 57 | } 58 | 59 | #endif -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRLoaderMetadata.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7be5a9f6dc9b26d43bfce6109841ffe5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRSettingsCopier.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using UnityEditor.Callbacks; 6 | using System.IO; 7 | using System; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | #if UNITY_XR_MANAGEMENT 12 | using UnityEngine.XR; 13 | using UnityEngine.Experimental.XR; 14 | using UnityEngine.XR.Management; 15 | using UnityEditor.XR.Management; 16 | using UnityEditor.Build; 17 | using UnityEditor.Build.Reporting; 18 | #endif 19 | 20 | namespace Unity.XR.OpenVR.Editor 21 | { 22 | public class OpenVRSettingsCopier 23 | { 24 | private const string defaultAssetPath = "Assets/XR/Settings/Open VR Settings.asset"; 25 | 26 | private static void CreatePath(string path) 27 | { 28 | string[] split = defaultAssetPath.Split('/'); 29 | for (int splitIndex = 1; splitIndex < split.Length; splitIndex++) 30 | { 31 | string splitPath = string.Join("/", split, 0, splitIndex); 32 | if (AssetDatabase.IsValidFolder(splitPath) == false) 33 | { 34 | AssetDatabase.CreateFolder(string.Join("/", split, 0, splitIndex - 1), split[splitIndex-1]); 35 | Debug.Log("Created: " + splitPath); 36 | } 37 | } 38 | } 39 | 40 | [PostProcessBuildAttribute(1)] 41 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 42 | { 43 | //make sure we're on a reasonable target 44 | if (target != BuildTarget.StandaloneLinux64 && target != BuildTarget.StandaloneWindows && target != BuildTarget.StandaloneWindows64) 45 | return; 46 | 47 | #if UNITY_XR_MANAGEMENT 48 | //make sure we have the xr settings 49 | XRGeneralSettings generalSettings = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget)); 50 | if (generalSettings == null) 51 | return; 52 | 53 | //make sure our loader is checked 54 | bool hasLoader = generalSettings.Manager.loaders.Any(loader => loader is OpenVRLoader); 55 | if (hasLoader == false) 56 | return; 57 | #endif 58 | 59 | OpenVRSettings settings = OpenVRSettings.GetSettings(); 60 | 61 | bool saved = settings.InitializeActionManifestFileRelativeFilePath(); 62 | 63 | string settingsAssetPath = AssetDatabase.GetAssetPath(settings); 64 | if (string.IsNullOrEmpty(settingsAssetPath)) 65 | { 66 | CreatePath(defaultAssetPath); 67 | UnityEditor.AssetDatabase.CreateAsset(settings, defaultAssetPath); 68 | settingsAssetPath = AssetDatabase.GetAssetPath(settings); 69 | } 70 | 71 | 72 | FileInfo buildPath = new FileInfo(pathToBuiltProject); 73 | string buildName = buildPath.Name.Replace(buildPath.Extension, ""); 74 | DirectoryInfo buildDirectory = buildPath.Directory; 75 | 76 | string dataDirectory = Path.Combine(buildDirectory.FullName, buildName + "_Data"); 77 | if (Directory.Exists(dataDirectory) == false) 78 | { 79 | string vsDebugDataDirectory = Path.Combine(buildDirectory.FullName, "build/bin/" + buildName + "_Data"); 80 | if (Directory.Exists(vsDebugDataDirectory) == false) 81 | { 82 | Debug.LogError("[OpenVR] Could not find data directory at: " + dataDirectory + ". Also checked vs debug at: " + vsDebugDataDirectory); 83 | } 84 | else 85 | { 86 | dataDirectory = vsDebugDataDirectory; 87 | } 88 | } 89 | 90 | string streamingAssets = Path.Combine(dataDirectory, "StreamingAssets"); 91 | if (Directory.Exists(streamingAssets) == false) 92 | Directory.CreateDirectory(streamingAssets); 93 | 94 | string streamingSteamVR = Path.Combine(streamingAssets, "SteamVR"); 95 | if (Directory.Exists(streamingSteamVR) == false) 96 | Directory.CreateDirectory(streamingSteamVR); 97 | 98 | Debug.Log("settingsAssetPath: " + settingsAssetPath); 99 | 100 | FileInfo newSettingsPath = new FileInfo(Path.Combine(streamingSteamVR, "OpenVRSettings.asset")); 101 | 102 | if (newSettingsPath.Exists) 103 | { 104 | newSettingsPath.IsReadOnly = false; 105 | newSettingsPath.Delete(); 106 | } 107 | 108 | //File.Copy(currentSettingsPath.FullName, newSettingsPath.FullName); 109 | File.WriteAllText(newSettingsPath.FullName, CreateSettingText()); 110 | Debug.Log("Wrote openvr settings to build directory: " + newSettingsPath.FullName); 111 | //Debug.Log("Copied openvr settings to build directory: " + newSettingsPath.FullName); 112 | } 113 | 114 | 115 | private static string CreateSettingText() 116 | { 117 | OpenVRSettings settings = OpenVRSettings.GetSettings(); 118 | StringBuilder text = new StringBuilder(); 119 | text.AppendLine("StereoRenderingMode: " + (int)settings.StereoRenderingMode); 120 | text.AppendLine("InitializationType: " + (int)settings.InitializationType); 121 | text.AppendLine("EditorAppKey: " + settings.EditorAppKey); 122 | text.AppendLine("ActionManifestFileRelativeFilePath: " + settings.ActionManifestFileRelativeFilePath); 123 | text.AppendLine("MirrorView: " + (int)settings.MirrorView); 124 | return text.ToString(); 125 | } 126 | } 127 | } -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRSettingsCopier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca9f8b5478cdcc443b6017651f29d5b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRSettingsEditor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using Unity.XR.OpenVR; 6 | 7 | namespace Unity.XR.OpenVR.Editor 8 | { 9 | [CustomEditor(typeof(OpenVRSettings))] 10 | public class OpenVRSettingsEditor : UnityEditor.Editor 11 | { 12 | private const string kStereoRenderingMode = "StereoRenderingMode"; 13 | 14 | static GUIContent s_StereoRenderingMode = EditorGUIUtility.TrTextContent("Stereo Rendering Mode"); 15 | 16 | private SerializedProperty m_StereoRenderingMode; 17 | 18 | private const string kInitializationType = "InitializationType"; 19 | 20 | static GUIContent s_InitializationType = EditorGUIUtility.TrTextContent("Application Type"); 21 | 22 | private SerializedProperty m_InitializationType; 23 | 24 | private const string kMirrorViewModeKey = "MirrorView"; 25 | 26 | static GUIContent s_MirrorViewMode = EditorGUIUtility.TrTextContent("Mirror View Mode"); 27 | 28 | private SerializedProperty m_MirrorViewMode; 29 | 30 | public GUIContent WindowsTab; 31 | private int tab = 0; 32 | 33 | public void OnEnable() 34 | { 35 | WindowsTab = new GUIContent("", EditorGUIUtility.IconContent("BuildSettings.Standalone.Small").image); 36 | } 37 | public static void CloseWindowHelper() 38 | { 39 | var window = SettingsService.OpenProjectSettings("Project/XR Plug-in Management"); 40 | if (window) 41 | { 42 | Debug.LogWarning("[Community OpenXR] Switching away from OpenVR Project settings window to avoid data corruption."); 43 | } 44 | EditorApplication.update -= CloseWindowHelper; 45 | closing = false; 46 | } 47 | private static bool closing = false; 48 | 49 | public override void OnInspectorGUI() 50 | { 51 | if (Application.isPlaying) 52 | { 53 | //need to close this window if we're in play mode. There's a bug that resets settings otherwise. 54 | EditorGUILayout.LabelField("Unity XR settings are unavailable while in play mode."); 55 | 56 | if (!closing) 57 | { 58 | closing = true; 59 | EditorApplication.update += CloseWindowHelper; 60 | } 61 | return; 62 | } 63 | 64 | if (serializedObject == null || serializedObject.targetObject == null) 65 | return; 66 | 67 | if (m_StereoRenderingMode == null) 68 | { 69 | m_StereoRenderingMode = serializedObject.FindProperty(kStereoRenderingMode); 70 | } 71 | if (m_InitializationType == null) 72 | { 73 | m_InitializationType = serializedObject.FindProperty(kInitializationType); 74 | } 75 | if (m_MirrorViewMode == null) 76 | { 77 | m_MirrorViewMode = serializedObject.FindProperty(kMirrorViewModeKey); 78 | } 79 | 80 | serializedObject.Update(); 81 | 82 | int currentMode = m_MirrorViewMode.intValue; 83 | if (m_MirrorViewMode != null) 84 | 85 | tab = GUILayout.Toolbar(tab, new GUIContent[] {WindowsTab},EditorStyles.toolbarButton); 86 | EditorGUILayout.Space(); 87 | 88 | EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true)); 89 | if (tab == 0) 90 | { 91 | EditorGUILayout.PropertyField(m_InitializationType, s_InitializationType); 92 | 93 | EditorGUILayout.PropertyField(m_StereoRenderingMode, s_StereoRenderingMode); 94 | EditorGUILayout.PropertyField(m_MirrorViewMode, s_MirrorViewMode); 95 | } 96 | EditorGUILayout.EndVertical(); 97 | 98 | serializedObject.ApplyModifiedProperties(); 99 | 100 | /* 101 | //can't have the settings window open during play mode 102 | int newMode = m_MirrorViewMode.intValue; 103 | 104 | if (currentMode != newMode && Application.isPlaying) 105 | { 106 | OpenVRSettings.SetMirrorViewMode((ushort)newMode); 107 | }*/ 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Editor/OpenVRSettingsEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca5566524b8d1ef48b5fb05b0ad0b564 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) Valve Corporation 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation andor 12 | other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e1bc58d6b989ad47b54d5bf4729255c 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/README.md: -------------------------------------------------------------------------------- 1 | # OpenVR XR SDK Package 2 | 3 | The purpose of this package is to provide OpenVR rendering to Unity XR. This package provides the necessary sdk libraries for users to build Applications that work with the OpenVR runtime. The OpenVR XR Plugin gives you access to rendering on all major VR devices through one interface. Explicit support for: HTC Vive, HTC Vive Cosmos, Oculus Rift, Oculus Rift S, Oculus Quest (link), Windows Mixed Reality, and Valve Index. Other SteamVR compatible devices are supported though may have inaccurate or incomplete features. 4 | 5 | # Documentation 6 | 7 | There is some brief documentation included with this plugin at /Documentation~/com.valvesoftware.unity.openvr.md 8 | 9 | # Input 10 | 11 | As part of our commitment to [OpenXR](https://store.steampowered.com/newshub/app/250820/view/2396425843528787269) we will begin targeting the OpenXR API in future versions of our game engine plugins. 12 | 13 | For now, to get access to controllers and other forms of input you will need to install the latest SteamVR Unity Plugin. This can be found on the Unity Asset Store (https://assetstore.unity.com/packages/tools/integration/steamvr-plugin-32647) or GitHub (https://github.com/ValveSoftware/steamvr_unity_plugin/releases). 14 | 15 | 16 | ## Known Issues: 17 | * Display Provider 18 | * In some circumstances the unity console will show errors on start saying "screen position out of view frustrum". This should not impact visuals. 19 | * OpenVR Mirror View Mode (default) can cause black screens in the game view. Please send us bug reports if this happens. 20 | * OpenVR Mirror View Mode requires use of Linear Color Space (Project Settings > Player > Other Settings > (Rendering) Color Space) 21 | * Linux - Vulkan - Multipass will crash. 22 | * Linux - OpenGL - Single Pass Instanced will crash. 23 | 24 | 25 | 26 | ## Bug reports: 27 | * For bug reports please create an issue on our github (https://github.com/ValveSoftware/unity-xr-plugin/issues) and include the following information 28 | * Detailed steps of what you were doing at the time 29 | * Your editor or build log (editor log location: %LOCALAPPDATA%\Unity\Editor\Editor.log) 30 | * A SteamVR System report DIRECTLY AFTER encountering the issue. (SteamVR interface -> Menu -> Create System Report -> Save to file) 31 | 32 | 33 | ## QuickStart 34 | 35 | ### Installation 36 | * Download the installer: https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/installer 37 | * Open your unity project and then open/import the unitypackage 38 | * Open the XR Management UI (Edit Menu -> Project Settings -> XR Plugin Management) 39 | * Click the checkbox next to OpenVR Loader - or in older versions - Under Plugin Providers hit the + icon and add “Open VR Loader” 40 | 41 | 42 | ### Standalone (no input) 43 | * Add a cube to the scene (scale to 0.1) 44 | * Add a Camera component to the cube 45 | * Add TrackedPoseDriver to the cube 46 | * Main Camera: Under Tracked Pose Driver: 47 | * For Device select: “Generic XR Device” 48 | * For Pose Source select: “Center Eye - HMD Reference” 49 | * Hit play and you should see a tracked camera 50 | 51 | 52 | ### SteamVR Input System: 53 | * Install SteamVR Unity Plugin v2.6.1+ from the Asset Store (https://assetstore.unity.com/packages/tools/integration/steamvr-plugin-32647) or GitHub (https://github.com/ValveSoftware/steamvr_unity_plugin/releases/) 54 | * It will install the OpenVR XR API package automatically for 2020.1+ for 2019.3/4 you’ll need to add it with the instructions above. 55 | * Open the SteamVR Input window (Window -> SteamVR Input) 56 | * Accept the default json 57 | * Click Save and Generate 58 | * Open the Interactions_Example scene (Assets/SteamVR/InteractionSystem/Samples/Interaction_Example.unity) 59 | * Hit play, verify that you can see your hands and teleport around 60 | 61 | 62 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7601c5eceb1a8248a4ec86cee840f36 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 201899aea67deb943b4d905c3e316242 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/DeviceLayouts.cs: -------------------------------------------------------------------------------- 1 | #if ENABLE_VR && UNITY_INPUT_SYSTEM && !PACKAGE_DOCS_GENERATION 2 | using UnityEngine.InputSystem; 3 | using UnityEngine.InputSystem.Controls; 4 | using UnityEngine.InputSystem.Layouts; 5 | using UnityEngine.InputSystem.XR; 6 | using UnityEngine.Scripting; 7 | 8 | namespace Unity.XR.OpenVR 9 | { 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/DeviceLayouts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7eac8d99b363b094db90dc5b59665823 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVREvents.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | using Valve.VR; 6 | 7 | namespace Unity.XR.OpenVR 8 | { 9 | public class OpenVREvent : UnityEvent { } 10 | public class OpenVREvents 11 | { 12 | private static OpenVREvents instance; 13 | 14 | //dictionaries are slow/allocate in mono for some reason. So we just allocate a bunch at the beginning. 15 | private OpenVREvent[] events; 16 | private int[] eventIndicies; 17 | private VREvent_t vrEvent; 18 | private uint vrEventSize; 19 | 20 | private bool preloadedEvents = false; 21 | 22 | private const int maxEventsPerUpdate = 64; 23 | private static bool debugLogAllEvents = false; 24 | 25 | private static bool enabled = true; 26 | 27 | public static void Initialize(bool lazyLoadEvents = false) 28 | { 29 | instance = new OpenVREvents(lazyLoadEvents); 30 | } 31 | 32 | public bool IsInitialized() 33 | { 34 | return instance != null; 35 | } 36 | 37 | public OpenVREvents(bool lazyLoadEvents = false) 38 | { 39 | if (OpenVRHelpers.IsUsingSteamVRInput()) 40 | { 41 | enabled = false; //let the steamvr plugin handle events 42 | return; 43 | } 44 | 45 | instance = this; 46 | events = new OpenVREvent[(int)EVREventType.VREvent_VendorSpecific_Reserved_End]; 47 | 48 | vrEvent = new VREvent_t(); 49 | vrEventSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t)); 50 | 51 | if (lazyLoadEvents == false) 52 | { 53 | for (int eventIndex = 0; eventIndex < events.Length; eventIndex++) 54 | { 55 | events[eventIndex] = new OpenVREvent(); 56 | } 57 | } 58 | else 59 | { 60 | preloadedEvents = true; 61 | } 62 | 63 | RegisterDefaultEvents(); 64 | } 65 | 66 | public void RegisterDefaultEvents() 67 | { 68 | AddListener(EVREventType.VREvent_Quit, On_VREvent_Quit); 69 | } 70 | 71 | public static void AddListener(EVREventType eventType, UnityAction action, bool removeOtherListeners = false) 72 | { 73 | instance.Add(eventType, action, removeOtherListeners); 74 | } 75 | public void Add(EVREventType eventType, UnityAction action, bool removeOtherListeners = false) 76 | { 77 | if (!enabled) 78 | { 79 | Debug.LogError("[OpenVR XR Plugin] This events class is currently not enabled, please use SteamVR_Events instead."); 80 | return; 81 | } 82 | 83 | int eventIndex = (int)eventType; 84 | if (preloadedEvents == false && events[eventIndex] == null) 85 | { 86 | events[eventIndex] = new OpenVREvent(); 87 | } 88 | 89 | if (removeOtherListeners) 90 | { 91 | events[eventIndex].RemoveAllListeners(); 92 | } 93 | 94 | events[eventIndex].AddListener(action); 95 | } 96 | 97 | public static void RemoveListener(EVREventType eventType, UnityAction action) 98 | { 99 | instance.Remove(eventType, action); 100 | } 101 | public void Remove(EVREventType eventType, UnityAction action) 102 | { 103 | int eventIndex = (int)eventType; 104 | if (preloadedEvents || events[eventIndex] != null) 105 | { 106 | events[eventIndex].RemoveListener(action); 107 | } 108 | } 109 | 110 | public static void Update() 111 | { 112 | instance.PollEvents(); 113 | } 114 | 115 | public void PollEvents() 116 | { 117 | if (Valve.VR.OpenVR.System != null && enabled) 118 | { 119 | for (int eventIndex = 0; eventIndex < maxEventsPerUpdate; eventIndex++) 120 | { 121 | if (Valve.VR.OpenVR.System == null || !Valve.VR.OpenVR.System.PollNextEvent(ref vrEvent, vrEventSize)) 122 | break; 123 | 124 | int uEventType = (int)vrEvent.eventType; 125 | 126 | if (debugLogAllEvents) 127 | { 128 | EVREventType eventType = (EVREventType)uEventType; 129 | Debug.Log(string.Format("[{0}] {1}", Time.frameCount, eventType.ToString())); 130 | } 131 | 132 | if (events[uEventType] != null) 133 | { 134 | events[uEventType].Invoke(vrEvent); 135 | } 136 | } 137 | } 138 | } 139 | 140 | private bool exiting = false; 141 | 142 | #region DefaultEvents 143 | private void On_VREvent_Quit(VREvent_t pEvent) 144 | { 145 | if (exiting == true) 146 | { 147 | return; 148 | } 149 | exiting = true; 150 | 151 | if (Valve.VR.OpenVR.System != null) 152 | { 153 | Valve.VR.OpenVR.System.AcknowledgeQuit_Exiting(); 154 | } 155 | 156 | #if UNITY_EDITOR 157 | Debug.Log("[OpenVR] Quit requested from OpenVR. Exiting application via EditorApplication.isPlaying = false"); 158 | UnityEditor.EditorApplication.isPlaying = false; 159 | #else 160 | Debug.Log("[OpenVR] Quit requested from OpenVR. Exiting application via Application.Quit"); 161 | Application.Quit(); 162 | #endif 163 | } 164 | #endregion 165 | } 166 | } -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVREvents.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb505e6a72cfceb4090e068d104af212 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVRHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Reflection; 6 | using UnityEngine; 7 | 8 | namespace Unity.XR.OpenVR 9 | { 10 | public class OpenVRHelpers 11 | { 12 | public static bool IsUsingSteamVRInput() 13 | { 14 | return DoesTypeExist("SteamVR_Input"); 15 | } 16 | 17 | public static bool DoesTypeExist(string className, bool fullname = false) 18 | { 19 | return GetType(className, fullname) != null; 20 | } 21 | 22 | public static Type GetType(string className, bool fullname = false) 23 | { 24 | Type foundType = null; 25 | if (fullname) 26 | { 27 | foundType = (from assembly in AppDomain.CurrentDomain.GetAssemblies() 28 | from type in assembly.GetTypes() 29 | where type.FullName == className 30 | select type).FirstOrDefault(); 31 | } 32 | else 33 | { 34 | foundType = (from assembly in AppDomain.CurrentDomain.GetAssemblies() 35 | from type in assembly.GetTypes() 36 | where type.Name == className 37 | select type).FirstOrDefault(); 38 | } 39 | 40 | return foundType; 41 | } 42 | 43 | public static string GetActionManifestPathFromPlugin() 44 | { 45 | Type steamvrInputType = GetType("SteamVR_Input"); 46 | MethodInfo getPathMethod = steamvrInputType.GetMethod("GetActionsFilePath"); 47 | object path = getPathMethod.Invoke(null, new object[] { false }); 48 | 49 | return (string)path; 50 | } 51 | 52 | public static string GetActionManifestNameFromPlugin() 53 | { 54 | Type steamvrInputType = GetType("SteamVR_Input"); 55 | MethodInfo getPathMethod = steamvrInputType.GetMethod("GetActionsFileName"); 56 | object path = getPathMethod.Invoke(null, null); 57 | 58 | return (string)path; 59 | } 60 | 61 | public static string GetEditorAppKeyFromPlugin() 62 | { 63 | Type steamvrInputType = GetType("SteamVR_Input"); 64 | MethodInfo getPathMethod = steamvrInputType.GetMethod("GetEditorAppKey"); 65 | object path = getPathMethod.Invoke(null, null); 66 | 67 | return (string)path; 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVRHelpers.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef682552623b09642aecf7201ce1733d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVRLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e00a699292c112c46a958e721f4e20d6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVRSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | using UnityEngine; 8 | 9 | #if UNITY_XR_MANAGEMENT 10 | using UnityEngine.XR.Management; 11 | #endif 12 | 13 | namespace Unity.XR.OpenVR 14 | { 15 | #if UNITY_XR_MANAGEMENT 16 | [XRConfigurationData("OpenVR", "Unity.XR.OpenVR.Settings")] 17 | #endif 18 | [System.Serializable] 19 | public class OpenVRSettings : ScriptableObject 20 | { 21 | public enum StereoRenderingModes 22 | { 23 | MultiPass = 0, 24 | SinglePassInstanced 25 | } 26 | 27 | public enum InitializationTypes 28 | { 29 | Scene = 1, 30 | Overlay = 2, 31 | } 32 | 33 | public enum MirrorViewModes 34 | { 35 | None = 0, 36 | Left, 37 | Right, 38 | OpenVR, 39 | } 40 | 41 | [SerializeField, Tooltip("This will check the package version and the latest on github and prompt you to upgrade once per project load.")] 42 | public bool PromptToUpgradePackage = true; 43 | 44 | [SerializeField, Tooltip("This will check the package version and the latest on github and prompt you to upgrade once per project load.")] 45 | public bool PromptToUpgradePreviewPackages = true; 46 | 47 | [SerializeField, Tooltip("This allows developers to skip upgrade prompts for just this version.")] 48 | public string SkipPromptForVersion = null; 49 | 50 | [SerializeField, Tooltip("Set the Stereo Rendering Method")] 51 | public StereoRenderingModes StereoRenderingMode = StereoRenderingModes.SinglePassInstanced; 52 | 53 | [SerializeField, Tooltip("Most applications initialize as type Scene")] 54 | public InitializationTypes InitializationType = InitializationTypes.Scene; 55 | 56 | [SerializeField, Tooltip("A generated unique identifier for your application while in the editor")] 57 | public string EditorAppKey = null; 58 | 59 | [SerializeField, Tooltip("Internal value that tells the system what the relative path is to the manifest")] 60 | public string ActionManifestFileRelativeFilePath; 61 | 62 | [SerializeField, Tooltip("Which eye to use when rendering the headset view to the main window (none, left, right, or a composite of both + OpenVR overlays)")] 63 | public MirrorViewModes MirrorView = MirrorViewModes.Right; 64 | 65 | public const string StreamingAssetsFolderName = "SteamVR"; 66 | public const string ActionManifestFileName = "legacy_manifest.json"; 67 | public static string GetStreamingSteamVRPath(bool create = true) 68 | { 69 | string path = System.IO.Path.Combine(Application.streamingAssetsPath, StreamingAssetsFolderName); 70 | 71 | if (create) 72 | { 73 | CreateDirectory(new DirectoryInfo(path)); 74 | } 75 | 76 | return path; 77 | } 78 | 79 | private static void CreateDirectory(DirectoryInfo directory) 80 | { 81 | if (directory.Parent.Exists == false) 82 | CreateDirectory(directory.Parent); 83 | 84 | if (directory.Exists == false) 85 | directory.Create(); 86 | } 87 | 88 | [SerializeField, Tooltip("Internal value that tells the system if we have copied the default binding files yet.")] 89 | public bool HasCopiedDefaults = false; 90 | 91 | public ushort GetStereoRenderingMode() 92 | { 93 | return (ushort)StereoRenderingMode; 94 | } 95 | 96 | public ushort GetInitializationType() 97 | { 98 | return (ushort)InitializationType; 99 | } 100 | 101 | public MirrorViewModes GetMirrorViewMode() 102 | { 103 | return MirrorView; 104 | } 105 | 106 | /// 107 | /// Sets the mirror view mode (left, right, composite of both + openvr overlays) at runtime. 108 | /// 109 | /// left, right, composite of both + openvr overlays 110 | public void SetMirrorViewMode(MirrorViewModes newMode) 111 | { 112 | MirrorView = newMode; 113 | SetMirrorViewMode((ushort)newMode); 114 | } 115 | 116 | public string GenerateEditorAppKey() 117 | { 118 | return string.Format("application.generated.unity.{0}.{1}.exe", CleanProductName(), ((int)(UnityEngine.Random.value * int.MaxValue)).ToString()); 119 | } 120 | 121 | private static string CleanProductName() 122 | { 123 | string productName = Application.productName; 124 | if (string.IsNullOrEmpty(productName)) 125 | productName = "unnamed_product"; 126 | else 127 | { 128 | productName = System.Text.RegularExpressions.Regex.Replace(productName, "[^\\w\\._]", ""); 129 | productName = productName.ToLower(); 130 | productName = string.Concat(productName.Normalize(NormalizationForm.FormD).Where( 131 | c => CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)); 132 | byte[] bytes = Encoding.ASCII.GetBytes(productName); 133 | char[] chars = Encoding.ASCII.GetChars(bytes); 134 | productName = new String(chars).Replace("?", ""); 135 | if (productName.Length == 0) 136 | { 137 | productName = Mathf.Abs(Application.productName.GetHashCode()).ToString(); 138 | } 139 | } 140 | 141 | return productName; 142 | } 143 | 144 | public static OpenVRSettings GetSettings(bool create = true) 145 | { 146 | OpenVRSettings settings = null; 147 | #if UNITY_EDITOR 148 | UnityEditor.EditorBuildSettings.TryGetConfigObject("Unity.XR.OpenVR.Settings", out settings); 149 | #else 150 | settings = OpenVRSettings.s_Settings; 151 | #endif 152 | 153 | if (settings == null && create) 154 | settings = OpenVRSettings.CreateInstance(); 155 | 156 | return settings; 157 | } 158 | 159 | [DllImport("XRSDKOpenVR", CharSet = CharSet.Auto)] 160 | public static extern void SetMirrorViewMode(ushort mirrorViewMode); 161 | 162 | 163 | public bool InitializeActionManifestFileRelativeFilePath() 164 | { 165 | string oldPath = ActionManifestFileRelativeFilePath; 166 | string newPath; 167 | 168 | if (OpenVRHelpers.IsUsingSteamVRInput()) 169 | { 170 | newPath = System.IO.Path.Combine(OpenVRSettings.GetStreamingSteamVRPath(false), OpenVRHelpers.GetActionManifestNameFromPlugin()); 171 | 172 | string fullpath = System.IO.Path.GetFullPath("."); 173 | newPath = newPath.Remove(0, fullpath.Length + 1); 174 | 175 | if (newPath.StartsWith("Assets")) 176 | newPath = newPath.Remove(0, "Assets".Length + 1); 177 | } 178 | else 179 | { 180 | newPath = null; 181 | } 182 | 183 | #if UNITY_EDITOR 184 | if (newPath != oldPath) 185 | { 186 | ActionManifestFileRelativeFilePath = newPath; 187 | UnityEditor.EditorUtility.SetDirty(this); 188 | UnityEditor.AssetDatabase.SaveAssets(); 189 | return true; 190 | } 191 | #endif 192 | return false; 193 | } 194 | 195 | #if UNITY_EDITOR 196 | public void Awake() 197 | { 198 | if (string.IsNullOrEmpty(this.EditorAppKey)) 199 | { 200 | this.EditorAppKey = this.GenerateEditorAppKey(); 201 | } 202 | 203 | this.InitializeActionManifestFileRelativeFilePath(); 204 | } 205 | #else 206 | public static OpenVRSettings s_Settings; 207 | 208 | public void Awake() 209 | { 210 | s_Settings = this; 211 | } 212 | #endif 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/OpenVRSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 642f9302999e6414fbe73dd29a2320a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/Unity.XR.OpenVR.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unity.XR.OpenVR", 3 | "rootNamespace": "", 4 | "references": [ 5 | "Unity.XR.Management", 6 | "Unity.InputSystem" 7 | ], 8 | "includePlatforms": [ 9 | "Editor", 10 | "LinuxStandalone64", 11 | "WSA", 12 | "WindowsStandalone32", 13 | "WindowsStandalone64" 14 | ], 15 | "excludePlatforms": [], 16 | "allowUnsafeCode": false, 17 | "overrideReferences": false, 18 | "precompiledReferences": [], 19 | "autoReferenced": true, 20 | "defineConstraints": [], 21 | "versionDefines": [ 22 | { 23 | "name": "com.unity.inputsystem", 24 | "expression": "", 25 | "define": "UNITY_INPUT_SYSTEM" 26 | }, 27 | { 28 | "name": "com.unity.xr.management", 29 | "expression": "", 30 | "define": "UNITY_XR_MANAGEMENT" 31 | } 32 | ], 33 | "noEngineReferences": false 34 | } -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/Unity.XR.OpenVR.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cfbcd76a29a93e4c99d7d24270f2bcb 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/UnitySubsystemsManifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XRSDKOpenVR", 3 | "version": "1.0.0-preview.1", 4 | "libraryName": "XRSDKOpenVR", 5 | 6 | "displays": [ 7 | { 8 | "id": "OpenVR Display" 9 | } 10 | ], 11 | "inputs": [ 12 | { 13 | "id": "OpenVR Input", 14 | "disablesLegacyInput": true, 15 | "disablesLegacyVr" : true 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/UnitySubsystemsManifest.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e95aec448a077004495d5024b514c926 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/openvr_api.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 513c1eab8437f804c9105d8e30c2f1f2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33c04d17be0897042bc269979faeb026 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 798b1953a36b9c24a9a9f9bd8b78ce0c 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 1 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 0 54 | settings: 55 | CPU: None 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86_64 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll.sig -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.dll.sig.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29de79db89a5dff41b0ae42c94b63a8b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.exp -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.exp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 356373dc6c207c64b9afa27dcec62a11 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.lib -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/XRSDKOpenVR.lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dcb5d2cd8d08234faa3c5762ff18bf5 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libXRSDKOpenVR.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/libXRSDKOpenVR.so -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libXRSDKOpenVR.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e122db1dd9eaaa4d8a7ede3c9014428 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86_64 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so.dbg -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so.dbg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9a975b3fbdd9074184f237f215ebfff 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/libopenvr_api.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0205ac724897de14093210d73610a809 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86_64 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621a66b9a7dcf4a4fb9e76f8acf14fd2 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 1 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 0 54 | settings: 55 | CPU: None 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86_64 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll.sig -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.dll.sig.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dcbfbb187adb6246ac3039a65544ac7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/openvr_api.lib -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/openvr_api.lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15d0d0f5dbfa7ab4fbab5c5584c3abcb 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/ucrtbased.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x64/ucrtbased.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x64/ucrtbased.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6deb187ea27ccbc4c9fb5cb35a4eae81 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 1 21 | Exclude OSXUniversal: 1 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 0 48 | settings: 49 | CPU: None 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: None 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86_64 62 | - first: 63 | WebGL: WebGL 64 | second: 65 | enabled: 0 66 | settings: {} 67 | userData: 68 | assetBundleName: 69 | assetBundleVariant: 70 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32e0dae70eb229e4aa52b060b615bf26 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d701870138d1d1842874109271d21b13 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 1 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: None 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll.sig -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.dll.sig.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 663dd0f4a1e4f8e498c0ba7a9a4b6ce5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.exp -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.exp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7a4ac874c1ca644b891f45c5a00ec65 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.lib -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/XRSDKOpenVR.lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de2899c22e17b5b47944d2318d392aea 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so.dbg -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so.dbg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd4685dd627887349a87d8185ea4ad91 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/libopenvr_api.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60ea4d0d3d3039b408d648fc9e9acc9b 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2b0b2e1a7ca0364da641e348d51be58 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 1 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 1 42 | settings: 43 | CPU: AnyCPU 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: x86_64 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 0 60 | settings: 61 | CPU: None 62 | userData: 63 | assetBundleName: 64 | assetBundleVariant: 65 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll.sig -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.dll.sig.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18e93e9e14e4b8a42a53fa538601813b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/openvr_api.lib -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/openvr_api.lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 308e0552d264a11449206f9c56040c05 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/ucrtbased.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Dependencies/Valve OpenXR/Runtime/x86/ucrtbased.dll -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/Runtime/x86/ucrtbased.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d63deed17b24384fb9394ff582a3b6b 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 1 21 | Exclude OSXUniversal: 1 22 | Exclude WebGL: 1 23 | Exclude Win: 0 24 | Exclude Win64: 0 25 | - first: 26 | Any: 27 | second: 28 | enabled: 0 29 | settings: {} 30 | - first: 31 | Editor: Editor 32 | second: 33 | enabled: 1 34 | settings: 35 | CPU: x86 36 | DefaultValueInitialized: true 37 | OS: AnyOS 38 | - first: 39 | Standalone: Linux64 40 | second: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | - first: 45 | Standalone: OSXUniversal 46 | second: 47 | enabled: 0 48 | settings: 49 | CPU: None 50 | - first: 51 | Standalone: Win 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: x86 56 | - first: 57 | Standalone: Win64 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: None 62 | - first: 63 | WebGL: WebGL 64 | second: 65 | enabled: 0 66 | settings: {} 67 | userData: 68 | assetBundleName: 69 | assetBundleVariant: 70 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.valvesoftware.unity.openvr", 3 | "displayName": "OpenVR XR Plugin", 4 | "version": "1.2.1", 5 | "unity": "2019.4", 6 | "description": "Provides rendering support for OpenVR devices in Unity XR. For input please see: https://github.com/ValveSoftware/steamvr_unity_plugin", 7 | "keywords": [ 8 | "openvr", 9 | "xr", 10 | "virtual", 11 | "reality", 12 | "xreditorsubsystem", 13 | "xrsdk", 14 | "steamvr", 15 | "vr", 16 | "unity", 17 | "sdk", 18 | "valve" 19 | ], 20 | "dependencies": { 21 | "com.unity.xr.management": "3.2.13", 22 | "com.unity.ugui": "1.0.0", 23 | "com.unity.xr.legacyinputhelpers": "2.1.4" 24 | }, 25 | "author": "Valve Corporation", 26 | "hideInEditor": false, 27 | "homepage": "https://github.com/ValveSoftware/unity-xr-plugin", 28 | "license": "BSD-3-Clause" 29 | } 30 | -------------------------------------------------------------------------------- /Dependencies/Valve OpenXR/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e37ec057560c32e4b9c07651b7ca4473 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Docs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1d07bc0e71be104e997ddeccc58946b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Docs/base_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Docs/base_component.png -------------------------------------------------------------------------------- /Docs/base_component.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abf0975788e9452479dad4026304dffa 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Docs/tracker_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Docs/tracker_component.png -------------------------------------------------------------------------------- /Docs/tracker_component.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8e70afc6985f9641b011828519032a0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2a534afb2d54a945bae6fc99194c53b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/AvatarBuildHook.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using VRC.SDKBase.Editor.BuildPipeline; 6 | 7 | namespace hackebein.objecttracking 8 | { 9 | [InitializeOnLoad] 10 | public class AvatarBuildHook : IVRCSDKPreprocessAvatarCallback 11 | { 12 | public int callbackOrder => -10042; 13 | 14 | public bool OnPreprocessAvatar(GameObject avatarGameObject) 15 | { 16 | var baseComponent = avatarGameObject.GetComponentInChildren(); 17 | if (baseComponent == null) 18 | { 19 | return true; 20 | } 21 | try 22 | { 23 | baseComponent.Apply(); 24 | return true; 25 | } 26 | catch (Exception e) 27 | { 28 | Debug.LogError("[Hackebein's Object Tracking] Failed to apply object tracking to avatar: " + e.Message); 29 | return false; 30 | } 31 | } 32 | } 33 | } 34 | #endif -------------------------------------------------------------------------------- /Editor/AvatarBuildHook.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72449897450245ea8a6887a16f9ee0c2 3 | timeCreated: 1728586878 -------------------------------------------------------------------------------- /Editor/Base.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d58dbdaed1fa4e45baa81807046044cf 3 | timeCreated: 1728747473 -------------------------------------------------------------------------------- /Editor/BaseEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4acf3520f639484081e6dcaf81fe2965 3 | timeCreated: 1728589864 -------------------------------------------------------------------------------- /Editor/SteamVR.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52b8c1e7a7fd4a70a173082f332d2676 3 | timeCreated: 1735388870 -------------------------------------------------------------------------------- /Editor/SteamVR/TrackedDevices.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 6 | using System.Linq; 7 | using Unity.XR.OpenVR; 8 | using UnityEditor; 9 | using UnityEditor.Animations; 10 | using Object = UnityEngine.Object; 11 | using VRC.SDK3.Avatars.Components; 12 | using VRC.SDK3.Avatars.ScriptableObjects; 13 | using Valve.VR; 14 | #endif 15 | 16 | namespace hackebein.objecttracking.steamvr 17 | { 18 | [Serializable] 19 | public class TrackedDevice 20 | { 21 | private string _identifier; 22 | 23 | public string identifier 24 | { 25 | get => _identifier; 26 | set 27 | { 28 | _identifier = value; 29 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 30 | Update(); 31 | #endif 32 | } 33 | } 34 | public string serialNumber { get; private set; } 35 | public string modelNumber { get; private set; } 36 | public string manufacturerName { get; private set; } 37 | public string trackingSystemName { get; private set; } 38 | public Vector3 position { get; } 39 | public Vector3 rotation { get; } 40 | 41 | public TrackedDevice() : this("", "", "", "", "", Vector3.zero, Vector3.zero) { } 42 | public TrackedDevice(string identifier, string serialNumber, string modelNumber, string manufacturerName, string trackingSystemName, Vector3 position, Vector3 rotation) 43 | { 44 | this._identifier = identifier; 45 | this.serialNumber = serialNumber; 46 | this.modelNumber = modelNumber; 47 | this.manufacturerName = manufacturerName; 48 | this.trackingSystemName = trackingSystemName; 49 | this.position = position; 50 | this.rotation = rotation; 51 | } 52 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 53 | public void Update() 54 | { 55 | TrackedDevices.Update().ForEach(device => 56 | { 57 | if (device.identifier == identifier) 58 | { 59 | serialNumber = device.serialNumber; 60 | modelNumber = device.modelNumber; 61 | manufacturerName = device.manufacturerName; 62 | trackingSystemName = device.trackingSystemName; 63 | } 64 | }); 65 | } 66 | #endif 67 | } 68 | 69 | [Serializable] 70 | public static class TrackedDevices 71 | { 72 | public static bool allowConnectingToSteamVR = true; 73 | public static List List = new List(); 74 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 75 | static TrackedDevices() 76 | { 77 | Update(); 78 | } 79 | private static string GetTrackedDeviceString(uint deviceIndex, ETrackedDeviceProperty prop) 80 | { 81 | ETrackedPropertyError error = ETrackedPropertyError.TrackedProp_Success; 82 | uint size = OpenVR.System.GetStringTrackedDeviceProperty(deviceIndex, prop, null, 0, ref error); 83 | if (size == 0) 84 | { 85 | return string.Empty; 86 | } 87 | 88 | System.Text.StringBuilder result = new System.Text.StringBuilder((int)size); 89 | OpenVR.System.GetStringTrackedDeviceProperty(deviceIndex, prop, result, size, ref error); 90 | 91 | return result.ToString(); 92 | } 93 | 94 | public static CVRSystem CheckSystem() 95 | { 96 | if (!allowConnectingToSteamVR) return null; 97 | 98 | CVRSystem system = OpenVR.System; 99 | if (system == null) 100 | { 101 | EVRInitError peError = EVRInitError.None; 102 | OpenVR.Init(ref peError, EVRApplicationType.VRApplication_Other, ""); 103 | if (peError == EVRInitError.Init_HmdNotFound) 104 | { 105 | Debug.LogWarning("[Hackebein's Object Tracking] SteamVR is not running!"); 106 | allowConnectingToSteamVR = false; 107 | } 108 | else if (peError != EVRInitError.None) 109 | { 110 | Debug.LogWarning("[Hackebein's Object Tracking] SteamVR/OpenVR: Unknown Error (" + peError + ")"); 111 | allowConnectingToSteamVR = false; 112 | } 113 | } 114 | return system; 115 | } 116 | 117 | public static List Update() 118 | { 119 | // We'll build a new list from the Python-like logic 120 | List = new List(); 121 | 122 | if (CheckSystem() != null) 123 | { 124 | var poses = new TrackedDevicePose_t[OpenVR.k_unMaxTrackedDeviceCount]; 125 | OpenVR.System.GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin.TrackingUniverseStanding, 0, poses); 126 | 127 | // Store original meta (Model, Manufacturer, etc.) keyed by serial 128 | var metaData = new Dictionary(); 129 | // Raw transforms 130 | Dictionary trackingRefsRaw = new Dictionary(); 131 | Dictionary trackingObjsRaw = new Dictionary(); 132 | Matrix4x4? hmdRaw = null; 133 | 134 | // Collect Python-like data 135 | for (uint i = 0; i < OpenVR.k_unMaxTrackedDeviceCount; i++) 136 | { 137 | if (!poses[i].bPoseIsValid || poses[i].eTrackingResult != ETrackingResult.Running_OK) 138 | continue; 139 | 140 | var devClass = OpenVR.System.GetTrackedDeviceClass(i); 141 | if (devClass == ETrackedDeviceClass.Invalid) 142 | continue; 143 | 144 | // Convert to Matrix4x4 145 | var poseMatrix = poses[i].mDeviceToAbsoluteTracking; 146 | Matrix4x4 mat44 = ConvertMatrix34ToMatrix44(poseMatrix); 147 | 148 | // Grab string properties 149 | string identifier = GetTrackedDeviceString(i, ETrackedDeviceProperty.Prop_SerialNumber_String); 150 | string serialNumber = GetTrackedDeviceString(i, ETrackedDeviceProperty.Prop_SerialNumber_String); 151 | string modelNumber = GetTrackedDeviceString(i, ETrackedDeviceProperty.Prop_ModelNumber_String); 152 | string manufacturerName = GetTrackedDeviceString(i, ETrackedDeviceProperty.Prop_ManufacturerName_String); 153 | string trackingSystemName = GetTrackedDeviceString(i, ETrackedDeviceProperty.Prop_TrackingSystemName_String); 154 | metaData[identifier] = (serialNumber, modelNumber, manufacturerName, trackingSystemName); 155 | 156 | // Fill references+HMD 157 | if (devClass == ETrackedDeviceClass.TrackingReference) 158 | trackingRefsRaw[identifier] = mat44; 159 | if (devClass == ETrackedDeviceClass.HMD) 160 | hmdRaw = mat44; 161 | 162 | // Everything in tracking objects 163 | trackingObjsRaw[identifier] = mat44; 164 | } 165 | 166 | // compute tracking reference 167 | Matrix4x4 trackingRef = ComputeTrackingReferencePosition(trackingRefsRaw); 168 | 169 | // dynamic Playspace 170 | if (trackingRefsRaw.Count > 0) 171 | { 172 | string[] order = trackingRefsRaw.Keys.OrderBy(k => k).ToArray(); 173 | var pos = trackingRef.GetColumn(3); 174 | pos.y = 0f; 175 | float yaw = QuaternionFromMatrix(trackingRefsRaw[order[0]]).eulerAngles.y; 176 | trackingObjsRaw["PlaySpace"] = Matrix4x4.Rotate(Quaternion.Euler(0f, yaw, 0f)); 177 | trackingObjsRaw["PlaySpace"].SetColumn(3, pos); 178 | metaData["PlaySpace"] = ("SteamVRPlayArea", "PlaySpace", "Hackebein", "openvr"); 179 | } 180 | 181 | // zero out Y+rotation 182 | trackingRef = SetYAndRotationToZero(trackingRef); 183 | 184 | var trackingObjects = new Dictionary(); 185 | foreach (var kvp in trackingObjsRaw) 186 | trackingObjects[kvp.Key] = RelativeMatrix(trackingRef, kvp.Value); 187 | 188 | // optional pill from HMD 189 | Matrix4x4 pill = Matrix4x4.identity; 190 | if (hmdRaw.HasValue) 191 | { 192 | pill = RelativeMatrix(trackingRef, SetYAndXZRotationToZero(hmdRaw.Value)); 193 | foreach (var kvp in trackingObjects) 194 | { 195 | string id = kvp.Key; 196 | Matrix4x4 trackerMat = kvp.Value; 197 | 198 | Matrix4x4 pos = RelativeMatrix(pill, trackerMat); 199 | //pos = RotateMatrixXZ(pos, pill); 200 | 201 | List.Add(new TrackedDevice( 202 | id, 203 | metaData[id].serialNumber, 204 | metaData[id].modelNumber, 205 | metaData[id].manufacturerName, 206 | metaData[id].trackingSystemName, 207 | pos.GetColumn(3), 208 | QuaternionFromMatrix(pos).eulerAngles)); 209 | } 210 | 211 | } 212 | } 213 | 214 | return List; 215 | } 216 | 217 | private static Matrix4x4 ConvertMatrix34ToMatrix44(HmdMatrix34_t m) 218 | { 219 | Matrix4x4 mat = Matrix4x4.identity; 220 | mat.m00 = m.m0; mat.m01 = m.m1; mat.m02 = -m.m2; mat.m03 = m.m3; 221 | mat.m10 = m.m4; mat.m11 = m.m5; mat.m12 = -m.m6; mat.m13 = m.m7; 222 | mat.m20 = -m.m8; mat.m21 = -m.m9; mat.m22 = m.m10; mat.m23 = -m.m11; 223 | return mat; 224 | } 225 | 226 | private static Matrix4x4 ComputeTrackingReferencePosition(Dictionary refs) 227 | { 228 | if (refs.Count == 0) return Matrix4x4.identity; 229 | 230 | Vector3 sum = Vector3.zero; 231 | foreach (var mat in refs.Values) 232 | { 233 | Vector4 column = mat.GetColumn(3); 234 | sum += new Vector3(column.x, column.y, column.z); 235 | } 236 | 237 | Vector3 avg = sum / refs.Count; 238 | Matrix4x4 result = Matrix4x4.identity; 239 | result.SetColumn(3, new Vector4(avg.x, avg.y, avg.z, 1f)); 240 | return result; 241 | } 242 | 243 | private static Matrix4x4 SetYAndXZRotationToZero(Matrix4x4 mat) 244 | { 245 | Vector3 pos = mat.GetColumn(3); 246 | pos.y = 0f; 247 | mat.SetColumn(3, new Vector4(pos.x, pos.y, pos.z, 1f)); 248 | 249 | float theta = Mathf.Atan2(mat.m20, mat.m00); 250 | mat.m00 = Mathf.Cos(theta); mat.m01 = 0f; mat.m02 = Mathf.Sin(theta); 251 | mat.m10 = 0f; mat.m11 = 1f; mat.m12 = 0f; 252 | mat.m20 = -Mathf.Sin(theta); mat.m21 = 0f; mat.m22 = Mathf.Cos(theta); 253 | 254 | return mat; 255 | } 256 | 257 | private static Matrix4x4 SetYAndRotationToZero(Matrix4x4 mat) 258 | { 259 | Vector3 pos = mat.GetColumn(3); 260 | pos.y = 0f; 261 | mat.SetColumn(3, new Vector4(pos.x, pos.y, pos.z, 1f)); 262 | 263 | mat.m00 = 1f; mat.m01 = 0f; mat.m02 = 0f; 264 | mat.m10 = 0f; mat.m11 = 1f; mat.m12 = 0f; 265 | mat.m20 = 0f; mat.m21 = 0f; mat.m22 = 1f; 266 | return mat; 267 | } 268 | 269 | private static Matrix4x4 RelativeMatrix(Matrix4x4 parent, Matrix4x4 child) 270 | { 271 | return parent.inverse * child; 272 | } 273 | 274 | private static Matrix4x4 RotateMatrixXZ(Matrix4x4 mat, Matrix4x4 pill) 275 | { 276 | Quaternion q = QuaternionFromMatrix(pill); 277 | float deg = q.eulerAngles.y; 278 | Matrix4x4 rot = Matrix4x4.Rotate(Quaternion.Euler(0f, deg, 0f)); 279 | 280 | // move position 281 | Vector3 newPos = rot.MultiplyPoint3x4(mat.GetColumn(3)); 282 | mat.SetColumn(3, new Vector4(newPos.x, newPos.y, newPos.z, 1f)); 283 | 284 | // double multiply 285 | mat = rot * mat; 286 | return mat; 287 | } 288 | 289 | private static Quaternion QuaternionFromMatrix(Matrix4x4 m) 290 | { 291 | return Quaternion.LookRotation(m.GetColumn(2), m.GetColumn(1)); 292 | } 293 | #endif 294 | } 295 | } 296 | -------------------------------------------------------------------------------- /Editor/SteamVR/TrackedDevices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7d996aafd0045f78c77306e11b21c08 3 | timeCreated: 1735388891 -------------------------------------------------------------------------------- /Editor/Tracker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using VRC.SDKBase; 4 | using hackebein.objecttracking.steamvr; 5 | 6 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using UnityEditor; 10 | using UnityEditor.Animations; 11 | using UnityEngine.Animations; 12 | using Object = UnityEngine.Object; 13 | using VRC.Dynamics; 14 | using VRC.SDK3.Avatars.Components; 15 | using VRC.SDK3.Avatars.ScriptableObjects; 16 | using VRC.SDK3.Dynamics.Constraint.Components; 17 | using hackebein.objecttracking.utility; 18 | using UnityEngine.iOS; 19 | #endif 20 | 21 | namespace hackebein.objecttracking 22 | { 23 | [ExecuteAlways] 24 | [DisallowMultipleComponent] 25 | [Serializable] 26 | [AddComponentMenu("Hackebein/Hackebein's Object Tracking Tracker")] 27 | public class Tracker : MonoBehaviour, IEditorOnly 28 | { 29 | [Serializable] 30 | public class Settings 31 | { 32 | public string identifier; 33 | public Axes axes = new Axes(); 34 | public float PositionDampingLocal = 0.05f; 35 | public float PositionDampingRemote = 0.05f; 36 | public float RotationDampingLocal = 0.03f; 37 | public float RotationDampingRemote = 0.03f; 38 | public bool hideBeyondLimits = true; 39 | } 40 | public Settings settings = new Settings(); 41 | public TrackedDevice device 42 | { 43 | get => steamvr.TrackedDevices.List.Find(d => d.identifier == settings.identifier); 44 | } 45 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 46 | public bool showDebugView 47 | { 48 | get => EditorPrefs.GetBool("Hackebein.ObjectTracking.ShowDebugView", false); 49 | set => EditorPrefs.SetBool("Hackebein.ObjectTracking.ShowDebugView", value); 50 | } 51 | #endif 52 | public bool? updateContinuously = null; 53 | public bool showPossibleLocalPositions = true; 54 | public bool showPossibleRemotePositions = true; 55 | public Tracker(){} 56 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 57 | private void OnDrawGizmosSelected() 58 | { 59 | if (showPossibleLocalPositions) 60 | { 61 | DrawGizmos(Color.red, settings.axes.Position, true); 62 | } 63 | if (showPossibleRemotePositions) 64 | { 65 | DrawGizmos(Color.yellow, settings.axes.Position, false); 66 | } 67 | } 68 | 69 | void OnRenderObject() 70 | { 71 | gameObject.transform.localPosition = new Vector3( 72 | settings.axes.Position.X.Local.Bits > 0 ? gameObject.transform.localPosition.x : 0, 73 | settings.axes.Position.Y.Local.Bits > 0 ? gameObject.transform.localPosition.y : 0, 74 | settings.axes.Position.Z.Local.Bits > 0 ? gameObject.transform.localPosition.z : 0 75 | ); 76 | gameObject.transform.localRotation = Quaternion.Euler( 77 | settings.axes.Rotation.X.Local.Bits > 0 ? gameObject.transform.localRotation.eulerAngles.x : 0, 78 | settings.axes.Rotation.Y.Local.Bits > 0 ? gameObject.transform.localRotation.eulerAngles.y : 0, 79 | settings.axes.Rotation.Z.Local.Bits > 0 ? gameObject.transform.localRotation.eulerAngles.z : 0 80 | ); 81 | 82 | if (gameObject.transform.parent == null) 83 | { 84 | gameObject.transform.localScale = new Vector3(1, 1, 1); 85 | } 86 | else 87 | { 88 | var baseComponent = gameObject.transform.parent.GetComponent(); 89 | if (baseComponent != null) 90 | { 91 | gameObject.transform.localScale = baseComponent.GetScaleVector(); 92 | } 93 | } 94 | } 95 | 96 | private void DrawGizmos(Color color, AxeGroup axeGroup, bool local) 97 | { 98 | Gizmos.color = color; 99 | var X = local ? axeGroup.X.Local : axeGroup.X.Remote; 100 | var Y = local ? axeGroup.Y.Local : axeGroup.Y.Remote; 101 | var Z = local ? axeGroup.Z.Local : axeGroup.Z.Remote; 102 | var min = new Vector3(X.ValueMin, Y.ValueMin, Z.ValueMin); 103 | var max = new Vector3(X.ValueMax, Y.ValueMax, Z.ValueMax); 104 | var scale = gameObject.transform.localScale; 105 | min.Scale(scale); 106 | max.Scale(scale); 107 | var size = max - min; 108 | if (gameObject.transform.parent != null) 109 | { 110 | var origin = gameObject.transform.parent.transform.position; 111 | var start = origin + min; 112 | var center = start + size / 2; 113 | Gizmos.DrawWireCube(center, size); 114 | } 115 | } 116 | #endif 117 | } 118 | } -------------------------------------------------------------------------------- /Editor/Tracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f60e0b0fe536430d855fd5d44d17747c 3 | timeCreated: 1735369911 -------------------------------------------------------------------------------- /Editor/TrackerEditor.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Unity.XR.OpenVR; 6 | using UnityEditor; 7 | using UnityEditor.Animations; 8 | using UnityEngine; 9 | using Valve.VR; 10 | using VRC.SDKBase; 11 | using VRC.SDK3.Avatars.Components; 12 | using VRC.SDK3.Avatars.ScriptableObjects; 13 | 14 | namespace hackebein.objecttracking 15 | { 16 | [CustomEditor(typeof(Tracker))] 17 | public class TrackerEditor : Editor 18 | { 19 | private string GetTrackedDeviceString(uint deviceIndex, ETrackedDeviceProperty prop) 20 | { 21 | ETrackedPropertyError error = ETrackedPropertyError.TrackedProp_Success; 22 | uint capacity = OpenVR.System.GetStringTrackedDeviceProperty(deviceIndex, prop, null, 0, ref error); 23 | 24 | // If error occurs or no capacity, return an empty string 25 | if (capacity == 0) 26 | { 27 | return string.Empty; 28 | } 29 | 30 | System.Text.StringBuilder result = new System.Text.StringBuilder((int)capacity); 31 | OpenVR.System.GetStringTrackedDeviceProperty(deviceIndex, prop, result, capacity, ref error); 32 | 33 | return result.ToString(); 34 | } 35 | 36 | public override void OnInspectorGUI() 37 | { 38 | var tracker = (Tracker)target; 39 | var halfWidth = utility.UnityHelper.RelativeWidth((float)1/2, false); 40 | var quarterWidth = utility.UnityHelper.RelativeWidth((float)1/4, false); 41 | 42 | // basic checks 43 | if (tracker.transform.parent == null) 44 | { 45 | EditorGUILayout.HelpBox("Parent Object must be Hackebein's Object Tracking Base Component", MessageType.Error); 46 | return; 47 | } 48 | Base baseComponent = tracker.transform.parent.GetComponent(); 49 | if (baseComponent == null) 50 | { 51 | var avatarDescriptor = tracker.transform.parent.GetComponent(); 52 | if (avatarDescriptor == null) 53 | { 54 | EditorGUILayout.HelpBox("Parent Object must be Hackebein's Object Tracking Base Component", MessageType.Error); 55 | return; 56 | } 57 | 58 | baseComponent = avatarDescriptor.GetComponentInChildren(); 59 | if (baseComponent == null) 60 | { 61 | var ObjectTrackingGameObject = Utility.FindOrCreateEmptyGameObject("ObjectTracking", avatarDescriptor.gameObject); 62 | baseComponent = ObjectTrackingGameObject.AddComponent(); 63 | tracker.transform.parent = ObjectTrackingGameObject.transform; 64 | } 65 | else 66 | { 67 | tracker.transform.parent = baseComponent.gameObject.transform; 68 | } 69 | } 70 | 71 | using (new GUILayout.HorizontalScope()) 72 | { 73 | GUI.backgroundColor = tracker.tag == "Untagged" ? Color.green : Color.white; 74 | if (GUILayout.Button(tracker.tag == "Untagged" ? "Active" : "Enable", halfWidth)) 75 | { 76 | tracker.tag = tracker.tag == "Untagged" ? "EditorOnly" : "Untagged"; 77 | } 78 | 79 | GUI.backgroundColor = Color.white; // Reset to default color 80 | 81 | if (GUILayout.Button("Remove", halfWidth)) 82 | { 83 | var child = tracker.transform.Find(tracker.settings.identifier); 84 | if (child != null) 85 | { 86 | DestroyImmediate(child.gameObject); 87 | } 88 | if (tracker.transform.childCount == 0) 89 | { 90 | DestroyImmediate(tracker.gameObject); 91 | } 92 | else 93 | { 94 | Utility.ResetGameObject(tracker.gameObject); 95 | } 96 | } 97 | } 98 | 99 | var foldoutInfo = false; 100 | using (new GUILayout.HorizontalScope()) 101 | { 102 | foldoutInfo = utility.UnityHelper.Foldout("Hackebein.ObjectTracking.TrackerEditor.TrackerInfoFoldout", "Tracker Identifier", true); 103 | //GUILayout.Label("Tracker Identifier", halfWidth); 104 | tracker.settings.identifier = EditorGUILayout.TextField(tracker.settings.identifier, halfWidth); 105 | } 106 | GUILayout.Space(2); // Somehow this is needed to prevent overlapping 107 | 108 | var availableIdentifiers = steamvr.TrackedDevices.List.Select(device => device.identifier).ToArray(); 109 | if (!availableIdentifiers.Contains(tracker.settings.identifier)) 110 | { 111 | availableIdentifiers = availableIdentifiers.Append(tracker.settings.identifier).ToArray(); 112 | } 113 | if (availableIdentifiers.Length > 1) 114 | { 115 | using (new GUILayout.HorizontalScope()) 116 | { 117 | GUILayout.Label("", halfWidth); 118 | tracker.settings.identifier = 119 | availableIdentifiers[EditorGUILayout.Popup("", Array.IndexOf(availableIdentifiers, tracker.settings.identifier), availableIdentifiers, halfWidth)]; 120 | } 121 | } 122 | if (tracker.device == null) 123 | { 124 | 125 | if (string.IsNullOrEmpty(tracker.settings.identifier)) 126 | { 127 | EditorGUILayout.HelpBox("Please enter a valid identifier", MessageType.Error); 128 | } 129 | } 130 | if (foldoutInfo) 131 | { 132 | using (new GUILayout.HorizontalScope()) 133 | { 134 | GUILayout.Label("Serial Number", halfWidth); 135 | GUI.enabled = false; 136 | EditorGUILayout.TextField(tracker.device != null ? tracker.device.serialNumber : "", halfWidth); 137 | GUI.enabled = true; 138 | } 139 | using (new GUILayout.HorizontalScope()) 140 | { 141 | GUILayout.Label("Model Number", halfWidth); 142 | GUI.enabled = false; 143 | EditorGUILayout.TextField(tracker.device != null ? tracker.device.modelNumber : "", halfWidth); 144 | GUI.enabled = true; 145 | } 146 | using (new GUILayout.HorizontalScope()) 147 | { 148 | GUILayout.Label("Manufacturer Name", halfWidth); 149 | GUI.enabled = false; 150 | EditorGUILayout.TextField(tracker.device != null ? tracker.device.manufacturerName : "", halfWidth); 151 | GUI.enabled = true; 152 | } 153 | using (new GUILayout.HorizontalScope()) 154 | { 155 | GUILayout.Label("Tracking System Name", halfWidth); 156 | GUI.enabled = false; 157 | EditorGUILayout.TextField(tracker.device != null ? tracker.device.trackingSystemName : "", halfWidth); 158 | GUI.enabled = true; 159 | } 160 | GUILayout.Space(5); 161 | } 162 | using (new GUILayout.HorizontalScope()) 163 | { 164 | // TODO: info 0.00 (0%) - 1.00 (100%) 165 | GUILayout.Label("Position Damping (local/remote) | 0.00 (0%) - 1.00 (100%)", halfWidth); 166 | tracker.settings.PositionDampingLocal = utility.Input.RangeNumberField(tracker.settings.PositionDampingLocal, 0f, 1f, quarterWidth); 167 | //tracker.settings.PositionDampingRemote = utility.Input.RangeNumberField(tracker.settings.PositionDampingRemote, 0f, 1f, quarterWidth); 168 | } 169 | 170 | using (new GUILayout.HorizontalScope()) 171 | { 172 | // TODO: info 0.00 (0%) - 1.00 (100%) 173 | GUILayout.Label("Rotation Damping (local/remote) | 0.00 (0%) - 1.00 (100%)", halfWidth); 174 | tracker.settings.RotationDampingLocal = utility.Input.RangeNumberField(tracker.settings.RotationDampingLocal, 0f, 1f, quarterWidth); 175 | //tracker.settings.RotationDampingRemote = utility.Input.RangeNumberField(tracker.settings.RotationDampingRemote, 0f, 1f, quarterWidth); 176 | } 177 | 178 | using (new GUILayout.HorizontalScope()) 179 | { 180 | GUILayout.Label("Hide Beyond Limits", halfWidth); 181 | tracker.settings.hideBeyondLimits = EditorGUILayout.Toggle(tracker.settings.hideBeyondLimits, halfWidth); 182 | } 183 | 184 | InspectorGuiAxeGroup(tracker.settings.axes.Position, "Position", 1f, "m"); 185 | InspectorGuiAxeGroup(tracker.settings.axes.Rotation, "Rotation", 1f, "°"); 186 | 187 | if (tracker.showDebugView) 188 | { 189 | if (utility.UnityHelper.Foldout("Hackebein.ObjectTracking.TrackerEditor.DebugFoldout", "Debug Settings")) 190 | { 191 | using (new GUILayout.HorizontalScope()) 192 | { 193 | GUILayout.Label("Show Possible Local Positions", halfWidth); 194 | tracker.showPossibleLocalPositions = EditorGUILayout.Toggle(tracker.showPossibleLocalPositions, halfWidth); 195 | } 196 | 197 | using (new GUILayout.HorizontalScope()) 198 | { 199 | GUILayout.Label("Show Possible Remote Positions", halfWidth); 200 | tracker.showPossibleRemotePositions = EditorGUILayout.Toggle(tracker.showPossibleRemotePositions, halfWidth); 201 | } 202 | } 203 | } 204 | } 205 | 206 | private void InspectorGuiAxeGroup(AxeGroup axeGroup, string name, float baseWith, string suffix) 207 | { 208 | var tracker = (Tracker)target; 209 | var witdth = (float)(baseWith / 8); 210 | var options = utility.UnityHelper.RelativeWidth(witdth, false); 211 | GUILayout.Label(name); 212 | using (new GUILayout.HorizontalScope()) 213 | { 214 | GUILayout.Label("", options); 215 | GUILayout.Label("Min Local", new GUIStyle() { richText = true }, options); 216 | GUILayout.Label("Max Local", new GUIStyle() { richText = true }, options); 217 | GUILayout.Label("Accuracy Local", new GUIStyle() { richText = true }, options); 218 | GUILayout.Label("Bits", options); 219 | GUILayout.Label("Min Remote", new GUIStyle() { richText = true }, options); 220 | GUILayout.Label("Max Remote", new GUIStyle() { richText = true }, options); 221 | GUILayout.Label("Accuracy Remote", new GUIStyle() { richText = true }, options); 222 | } 223 | InspectorGuiAxe(axeGroup.X, "X", witdth, suffix); 224 | InspectorGuiAxe(axeGroup.Y, "Y", witdth, suffix); 225 | InspectorGuiAxe(axeGroup.Z, "Z", witdth, suffix); 226 | } 227 | 228 | private void InspectorGuiAxe(Axe axe, string name, float baseWith, string suffix) 229 | { 230 | var tracker = (Tracker)target; 231 | var options = utility.UnityHelper.RelativeWidth(baseWith, false); 232 | using (new GUILayout.HorizontalScope()) 233 | { 234 | GUILayout.Label(name, options); 235 | axe.Local.ValueMin = utility.Input.RangeNumberField(axe.Local.ValueMin, axe.Local.ValueLimitMin, axe.Local.ValueLimitMax, options); 236 | axe.Local.ValueMax = utility.Input.RangeNumberField(axe.Local.ValueMax, axe.Local.ValueLimitMin, axe.Local.ValueLimitMax, options); 237 | utility.UnityHelper.LabelAccuracy(axe.Local.ValueMax - axe.Local.ValueMin, axe.Local.Bits, suffix, options); 238 | axe.Remote.Bits = utility.Input.RangeNumberField(axe.Remote.Bits, axe.Remote.BitsLimitMin, axe.Remote.BitsLimitMax, options); 239 | axe.Remote.ValueMin = utility.Input.RangeNumberField(axe.Remote.ValueMin, axe.Remote.ValueLimitMin, axe.Remote.ValueLimitMax, options); 240 | axe.Remote.ValueMax = utility.Input.RangeNumberField(axe.Remote.ValueMax, axe.Remote.ValueLimitMin, axe.Remote.ValueLimitMax, options); 241 | utility.UnityHelper.LabelAccuracy(axe.Remote.ValueMax - axe.Remote.ValueMin, axe.Remote.Bits, suffix, options); 242 | } 243 | } 244 | } 245 | } 246 | #endif 247 | -------------------------------------------------------------------------------- /Editor/TrackerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2c2b85b7e094836b586070f84362608 3 | timeCreated: 1728589901 -------------------------------------------------------------------------------- /Editor/Utilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45e458935caa47e46a5ec4217b16c69e 3 | timeCreated: 1699731724 -------------------------------------------------------------------------------- /Editor/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54181702ceb5492aa2d20b5e54f02686 3 | timeCreated: 1735346080 -------------------------------------------------------------------------------- /Editor/Utility/Axe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace hackebein.objecttracking 4 | { 5 | [Serializable] 6 | public class AxeTarget 7 | { 8 | public int Bits; 9 | public int BitsLimitMin { get; } 10 | public int BitsLimitMax { get; } 11 | public float ValueLimitMin { get; } 12 | public float ValueLimitMax { get; } 13 | public float ValueMin; 14 | public float ValueMax; 15 | 16 | public AxeTarget(int bits, int bitsLimitMin, int bitsLimitMax, float valueLimitMin, float valueLimitMax, float valueMin, float valueMax) 17 | { 18 | Bits = bits; 19 | BitsLimitMin = bitsLimitMin; 20 | BitsLimitMax = bitsLimitMax; 21 | ValueLimitMin = valueLimitMin; 22 | ValueLimitMax = valueLimitMax; 23 | ValueMin = valueMin; 24 | ValueMax = valueMax; 25 | } 26 | 27 | } 28 | 29 | [Serializable] 30 | public class Axe 31 | { 32 | public AxeTarget Local { get; } 33 | public AxeTarget Remote { get; } 34 | 35 | public Axe(AxeTarget local, AxeTarget remote) 36 | { 37 | Local = local; 38 | Remote = remote; 39 | } 40 | } 41 | 42 | [Serializable] 43 | public class AxeGroup 44 | { 45 | public Axe X { get; } 46 | public Axe Y { get; } 47 | public Axe Z { get; } 48 | 49 | public AxeGroup(Axe x, Axe y, Axe z) 50 | { 51 | X = x; 52 | Y = y; 53 | Z = z; 54 | } 55 | } 56 | 57 | [Serializable] 58 | public class Axes 59 | { 60 | public AxeGroup Position { get; } 61 | public AxeGroup Rotation { get; } 62 | 63 | public static int DefaultMinBitsPerPositionAxisOnLocal = 0; 64 | public static int DefaultMaxBitsPerPositionAxisOnLocal = 32; 65 | public static int DefaultBitsPerPositionAxisOnLocal = 32; 66 | 67 | public static float DefaultMinPositionAxisOnLocal = -12; 68 | public static float DefaultMaxPositionAxisOnLocal = 12; 69 | 70 | public static int DefaultMinBitsPerRotationAxisOnLocal = 0; 71 | public static int DefaultMaxBitsPerRotationAxisOnLocal = 32; 72 | public static int DefaultBitsPerRotationAxisOnLocal = 32; 73 | 74 | public static float DefaultMinRotationAxisOnLocal = -180; 75 | public static float DefaultMaxRotationAxisOnLocal = 180; 76 | 77 | public static int DefaultMinBitsPerPositionAxisOnRemote = 0; 78 | public static int DefaultMaxBitsPerPositionAxisOnRemote = 32; 79 | public static int DefaultBitsPerPositionAxisOnRemote = 10; 80 | 81 | public static float DefaultMinPositionAxisOnRemote = -5; 82 | public static float DefaultMaxPositionAxisOnRemote = 5; 83 | 84 | public static int DefaultMinBitsPerRotationAxisOnRemote = 0; 85 | public static int DefaultMaxBitsPerRotationAxisOnRemote = 32; 86 | public static int DefaultBitsPerRotationAxisOnRemote = 6; 87 | 88 | public static float DefaultMinRotationAxisOnRemote = -180; 89 | public static float DefaultMaxRotationAxisOnRemote = 180; 90 | public static readonly Axes Default; 91 | 92 | public Axes() 93 | { 94 | Position = new AxeGroup( 95 | new Axe( 96 | new AxeTarget(DefaultBitsPerPositionAxisOnLocal, DefaultMinBitsPerPositionAxisOnLocal, DefaultMaxBitsPerPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal), 97 | new AxeTarget(DefaultBitsPerPositionAxisOnRemote, DefaultMinBitsPerPositionAxisOnRemote, DefaultMaxBitsPerPositionAxisOnRemote, DefaultMinPositionAxisOnRemote, DefaultMaxPositionAxisOnRemote, DefaultMinPositionAxisOnRemote, DefaultMaxPositionAxisOnRemote) 98 | ), 99 | new Axe( 100 | new AxeTarget(DefaultBitsPerPositionAxisOnLocal, DefaultMinBitsPerPositionAxisOnLocal, DefaultMaxBitsPerPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal), 101 | new AxeTarget(DefaultBitsPerPositionAxisOnRemote - 1, DefaultMinBitsPerPositionAxisOnRemote, DefaultMaxBitsPerPositionAxisOnRemote, DefaultMinPositionAxisOnRemote, DefaultMaxPositionAxisOnRemote, 0, DefaultMaxPositionAxisOnRemote) 102 | ), 103 | new Axe( 104 | new AxeTarget(DefaultBitsPerPositionAxisOnLocal, DefaultMinBitsPerPositionAxisOnLocal, DefaultMaxBitsPerPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal, DefaultMinPositionAxisOnLocal, DefaultMaxPositionAxisOnLocal), 105 | new AxeTarget(DefaultBitsPerPositionAxisOnRemote, DefaultMinBitsPerPositionAxisOnRemote, DefaultMaxBitsPerPositionAxisOnRemote, DefaultMinPositionAxisOnRemote, DefaultMaxPositionAxisOnRemote, DefaultMinPositionAxisOnRemote, DefaultMaxPositionAxisOnRemote) 106 | ) 107 | ); 108 | Rotation = new AxeGroup( 109 | new Axe( 110 | new AxeTarget(DefaultBitsPerRotationAxisOnLocal, DefaultMinBitsPerRotationAxisOnLocal, DefaultMaxBitsPerRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal), 111 | new AxeTarget(DefaultBitsPerRotationAxisOnRemote, DefaultMinBitsPerRotationAxisOnRemote, DefaultMaxBitsPerRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote) 112 | ), 113 | new Axe( 114 | new AxeTarget(DefaultBitsPerRotationAxisOnLocal, DefaultMinBitsPerRotationAxisOnLocal, DefaultMaxBitsPerRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal), 115 | new AxeTarget(DefaultBitsPerRotationAxisOnRemote, DefaultMinBitsPerRotationAxisOnRemote, DefaultMaxBitsPerRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote) 116 | ), 117 | new Axe( 118 | new AxeTarget(DefaultBitsPerRotationAxisOnLocal, DefaultMinBitsPerRotationAxisOnLocal, DefaultMaxBitsPerRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal, DefaultMinRotationAxisOnLocal, DefaultMaxRotationAxisOnLocal), 119 | new AxeTarget(DefaultBitsPerRotationAxisOnRemote, DefaultMinBitsPerRotationAxisOnRemote, DefaultMaxBitsPerRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote, DefaultMinRotationAxisOnRemote, DefaultMaxRotationAxisOnRemote) 120 | ) 121 | ); 122 | 123 | } 124 | 125 | public Axes(AxeGroup position, AxeGroup rotation) 126 | { 127 | Position = position; 128 | Rotation = rotation; 129 | 130 | } 131 | } 132 | } -------------------------------------------------------------------------------- /Editor/Utility/Axe.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c82b6466ec154c3285d4e22f8cf7e185 3 | timeCreated: 1735377658 -------------------------------------------------------------------------------- /Editor/Utility/Input.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Text; 4 | using System.Text.RegularExpressions; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using Unity.XR.OpenVR; 8 | using UnityEditor; 9 | using UnityEditor.Animations; 10 | using UnityEngine; 11 | using VRC.SDK3.Avatars.Components; 12 | using VRC.SDK3.Avatars.ScriptableObjects; 13 | using Valve.VR; 14 | 15 | namespace hackebein.objecttracking.utility 16 | { 17 | public static class Input 18 | { 19 | public static string MakeNameSafe(string fileName) 20 | { 21 | if (string.IsNullOrEmpty(fileName)) 22 | return string.Empty; 23 | 24 | const string allowedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"; 25 | 26 | var sb = new StringBuilder(fileName.Length); 27 | 28 | foreach (char c in fileName) 29 | { 30 | // If it's in the allowed set, keep it 31 | if (allowedChars.IndexOf(c) >= 0) 32 | { 33 | sb.Append(c); 34 | } 35 | else 36 | { 37 | sb.Append('_'); 38 | } 39 | } 40 | string result = Regex.Replace(sb.ToString(), "_+", "_").Trim('_').ToLower(); 41 | return result; 42 | } 43 | public static int RangeNumberField(int value, int min, int max, GUILayoutOption[] guiLayoutOption) 44 | { 45 | return (int)RangeNumberField((float)value, min, max, guiLayoutOption); 46 | } 47 | 48 | public static float RangeNumberField(float value, float min, float max, GUILayoutOption[] guiLayoutOption) 49 | { 50 | //TODO: add +/- buttons 51 | value = EditorGUILayout.FloatField(value, guiLayoutOption); 52 | if (value < min) 53 | { 54 | value = min; 55 | } 56 | else if (value > max) 57 | { 58 | value = max; 59 | } 60 | 61 | return value; 62 | } 63 | 64 | public static int SliderNumberField(int value, int min, int max, GUILayoutOption[] guiLayoutOption) 65 | { 66 | return (int)GUILayout.HorizontalSlider(value, min, max, guiLayoutOption.Append(GUILayout.Height(20)).ToArray()); 67 | } 68 | 69 | public static float SliderNumberField(float value, float min, float max, GUILayoutOption[] guiLayoutOption) 70 | { 71 | return GUILayout.HorizontalSlider(value, min, max, guiLayoutOption.Append(GUILayout.Height(20)).ToArray()); 72 | } 73 | } 74 | } 75 | #endif -------------------------------------------------------------------------------- /Editor/Utility/Input.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efa9ca93d6544b96bd4faa83b2a0ab64 3 | timeCreated: 1735380094 -------------------------------------------------------------------------------- /Editor/Utility/RegistryReader.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace hackebein.objecttracking.utility 6 | { 7 | public static class RegistryReader 8 | { 9 | // --- Constants & Types --- 10 | 11 | // Predefined registry root handles 12 | public static readonly UIntPtr HKEY_CLASSES_ROOT = (UIntPtr)0x80000000; 13 | public static readonly UIntPtr HKEY_CURRENT_USER = (UIntPtr)0x80000001; 14 | public static readonly UIntPtr HKEY_LOCAL_MACHINE = (UIntPtr)0x80000002; 15 | public static readonly UIntPtr HKEY_USERS = (UIntPtr)0x80000003; 16 | public static readonly UIntPtr HKEY_CURRENT_CONFIG = (UIntPtr)0x80000005; 17 | 18 | // Access mask for reading keys 19 | private const int KEY_READ = 0x20019; 20 | 21 | // Possible registry value types (not exhaustively listed) 22 | private const int REG_NONE = 0; // No value type 23 | private const int REG_SZ = 1; // Unicode nul terminated string 24 | private const int REG_EXPAND_SZ = 2; // Unicode nul terminated string 25 | private const int REG_BINARY = 3; // Free form binary 26 | private const int REG_DWORD = 4; // 32-bit number 27 | private const int REG_QWORD = 11; // 64-bit number 28 | 29 | // --- P/Invoke Signatures --- 30 | 31 | [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 32 | private static extern int RegOpenKeyEx( 33 | UIntPtr hKey, 34 | string lpSubKey, 35 | int ulOptions, 36 | int samDesired, 37 | out IntPtr phkResult); 38 | 39 | [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 40 | private static extern int RegQueryValueEx( 41 | IntPtr hKey, 42 | string lpValueName, 43 | IntPtr lpReserved, 44 | out int lpType, 45 | byte[] lpData, 46 | ref int lpcbData); 47 | 48 | [DllImport("advapi32.dll", SetLastError = true)] 49 | private static extern int RegCloseKey(IntPtr hKey); 50 | 51 | // --- Public Methods --- 52 | 53 | /// 54 | /// Reads (up to) 8 bytes from a Windows registry value and interprets them as a 64-bit (double). 55 | /// This mimics the Python function that always treats the read bytes as a double, 56 | /// even if the registry value is incorrectly marked as a DWORD. 57 | /// 58 | /// One of the predefined registry root constants (e.g. HKEY_LOCAL_MACHINE). 59 | /// The path to the registry key (e.g. "SOFTWARE\\MyKey"). 60 | /// The name of the registry value to read. 61 | /// Default value if the read fails. 62 | /// The registry value as a double, or the default value if the read fails. 63 | public static double ReadRegistryRawQword(UIntPtr hive, string subkey, string valueName, double defaultValue) 64 | { 65 | IntPtr hKey = IntPtr.Zero; 66 | try 67 | { 68 | // 1) Open the registry key 69 | int result = RegOpenKeyEx(hive, subkey, 0, KEY_READ, out hKey); 70 | if (result != 0 || hKey == IntPtr.Zero) 71 | { 72 | // Could throw, but here we just return the default if open fails 73 | throw new InvalidOperationException($"RegOpenKeyEx failed with error code {result}."); 74 | } 75 | 76 | // Prepare variables for the query 77 | int type; 78 | byte[] rawData = new byte[8]; // up to 8 bytes 79 | int dataSize = rawData.Length; // initially 8 80 | 81 | // 2) Query the registry value 82 | result = RegQueryValueEx(hKey, valueName, IntPtr.Zero, out type, rawData, ref dataSize); 83 | if (result != 0) 84 | { 85 | throw new InvalidOperationException($"RegQueryValueEx failed with error code {result}."); 86 | } 87 | 88 | // If fewer than 8 bytes were read, the rest remain zero; interpret as double 89 | // If more than 8 bytes exist in the registry, only the first 8 will be used 90 | if (dataSize < 8) 91 | { 92 | // Zero-pad or just trust that the array is already zeroed 93 | // so effectively only dataSize bytes are relevant 94 | } 95 | 96 | // 3) Interpret the raw bytes as a 64-bit double (little-endian) 97 | return BitConverter.ToDouble(rawData, 0); 98 | } 99 | catch (Exception ex) 100 | { 101 | Console.WriteLine($"An error occurred: {ex.Message}"); 102 | return defaultValue; 103 | } 104 | finally 105 | { 106 | // 4) Close the key 107 | if (hKey != IntPtr.Zero) 108 | { 109 | RegCloseKey(hKey); 110 | } 111 | } 112 | } 113 | 114 | /// 115 | /// Converts up to 8 bytes of little-endian data into a 64-bit integer (signed or unsigned). 116 | /// This mirrors the Python function bytes_to_qword_le. 117 | /// 118 | /// Raw bytes from the registry. 119 | /// Interpret as signed if true, otherwise unsigned. 120 | /// A 64-bit integer (long in C#). 121 | public static long BytesToQwordLe(byte[] raw, bool signed = false) 122 | { 123 | if (raw.Length > 8) 124 | throw new ArgumentException("Data is longer than 8 bytes; unexpected for a QWORD."); 125 | 126 | // Create an 8-byte buffer; pad the remainder with zeros if less than 8 127 | byte[] data8 = new byte[8]; 128 | Array.Copy(raw, data8, raw.Length); 129 | 130 | if (signed) 131 | { 132 | return BitConverter.ToInt64(data8, 0); 133 | } 134 | else 135 | { 136 | // For an "unsigned" interpretation, cast BitConverter.ToUInt64 to long 137 | // if you need it as a long. You could also return a ulong instead. 138 | ulong val = BitConverter.ToUInt64(data8, 0); 139 | return unchecked((long)val); 140 | } 141 | } 142 | } 143 | } 144 | #endif 145 | -------------------------------------------------------------------------------- /Editor/Utility/RegistryReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aefc0c92b59c41939c80d23e87e5a496 3 | timeCreated: 1735346098 -------------------------------------------------------------------------------- /Editor/Utility/UnityHelper.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Unity.XR.OpenVR; 6 | using UnityEditor; 7 | using UnityEditor.Animations; 8 | using UnityEngine; 9 | using VRC.SDKBase; 10 | using VRC.SDK3.Avatars.Components; 11 | using VRC.SDK3.Avatars.ScriptableObjects; 12 | using Valve.VR; 13 | 14 | namespace hackebein.objecttracking.utility 15 | { 16 | public static class UnityHelper 17 | { 18 | public static string AddHashToKeyName(string key) 19 | { 20 | uint hashVal = 5381; 21 | 22 | foreach (char c in key) 23 | { 24 | // Multiply by 33 and XOR with the character's code 25 | hashVal = (hashVal * 33) ^ c; 26 | } 27 | 28 | return $"{key}_h{hashVal}"; 29 | } 30 | 31 | /* AvatarDescriptorEditor3.Foldout */ 32 | public static bool Foldout(string editorPrefsKey, string label, bool deft = false) 33 | { 34 | bool prevState = EditorPrefs.GetBool(editorPrefsKey, deft); 35 | bool state = EditorGUILayout.Foldout(prevState, label); 36 | if (state != prevState) 37 | EditorPrefs.SetBool(editorPrefsKey, state); 38 | return state; 39 | } 40 | 41 | public static GUILayoutOption[] RelativeWidth(float width, bool boxed = false, float offset = 0) 42 | { 43 | float taken = 0; 44 | if (width != 0f) 45 | { 46 | taken -= Mathf.Max(((1f / width) - 1f) * 3f); 47 | } 48 | if (boxed) taken -= 6f; 49 | return new[] { GUILayout.Width((EditorGUIUtility.currentViewWidth - 22f + taken) * width + offset) }; 50 | } 51 | 52 | public static void LabelAccuracy(float range, int bits, string suffix, GUILayoutOption[] guiLayoutOption) 53 | { 54 | using (new GUILayout.VerticalScope()) 55 | { 56 | float accuracy = range / (1L << bits); 57 | if (suffix == "m" && accuracy < 0.001) 58 | { 59 | GUILayout.Label("<0.001" + suffix, guiLayoutOption); 60 | GUILayout.Label("<0.04in", guiLayoutOption); 61 | } 62 | else if (suffix == "°" && accuracy < 0.1) 63 | { 64 | GUILayout.Label("<0.1" + suffix, guiLayoutOption); 65 | } 66 | else if (bits > 0 && suffix == "m") 67 | { 68 | GUILayout.Label(accuracy.ToString("F3") + suffix, guiLayoutOption); 69 | GUILayout.Label((accuracy / 0.0254).ToString("F3") + "in", guiLayoutOption); 70 | } 71 | else if (bits > 0 && suffix == "°") 72 | { 73 | GUILayout.Label(accuracy.ToString("F2") + suffix, guiLayoutOption); 74 | } 75 | else 76 | { 77 | GUILayout.Label("n/A", guiLayoutOption); 78 | } 79 | } 80 | } 81 | } 82 | } 83 | #endif 84 | -------------------------------------------------------------------------------- /Editor/Utility/UnityHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfb2c006a13f441ca1e57aabc80f5db6 3 | timeCreated: 1735347326 -------------------------------------------------------------------------------- /Editor/VRChat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6235f7484a04659a685a2d4b370b302 3 | timeCreated: 1735328457 -------------------------------------------------------------------------------- /Editor/VRChat/ExpressionMenu.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using hackebein.objecttracking.utility; 5 | using VRC.SDK3.Avatars.ScriptableObjects; 6 | using UnityEditor; 7 | using UnityEngine; 8 | using Object = UnityEngine.Object; 9 | 10 | namespace hackebein.objecttracking.vrchat 11 | { 12 | public static class ExpressionMenu 13 | { 14 | public static VRCExpressionsMenu CreateMenu(string path) 15 | { 16 | var menu = ScriptableObject.CreateInstance(); 17 | if (menu.controls == null) 18 | { 19 | menu.controls = new List(); 20 | } 21 | 22 | EditorUtility.SetDirty(menu); 23 | Utility.CreatePathRecursive(System.IO.Path.GetDirectoryName(path)); 24 | AssetDatabase.CreateAsset(menu, path + "/" + menu.GetHashCode() + ".asset"); 25 | return menu; 26 | } 27 | 28 | public static VRCExpressionsMenu CreateSubMenu(VRCExpressionsMenu expressionsMenu, string name, string path, Texture2D icon = null) 29 | { 30 | var newMenu = CreateMenu(path); 31 | expressionsMenu.controls.Add(new VRCExpressionsMenu.Control() 32 | { 33 | name = name, 34 | icon = icon, 35 | type = VRCExpressionsMenu.Control.ControlType.SubMenu, 36 | subMenu = newMenu 37 | }); 38 | EditorUtility.SetDirty(expressionsMenu); 39 | return newMenu; 40 | } 41 | 42 | public static VRCExpressionsMenu CreateIfNeededMoreMenu(VRCExpressionsMenu expressionsMenu, string path) 43 | { 44 | if (expressionsMenu.controls.Count >= 8) 45 | { 46 | Debug.LogWarning("[Hackebein's Object Tracking] The maximum number of controls in an expression menu is reached. Uploading the avatar might fail."); 47 | return expressionsMenu; 48 | } 49 | 50 | if (expressionsMenu.controls.Count == 7) 51 | { 52 | return CreateSubMenu(expressionsMenu, "More ...", path); 53 | } 54 | 55 | return expressionsMenu; 56 | } 57 | } 58 | } 59 | #endif -------------------------------------------------------------------------------- /Editor/VRChat/ExpressionMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddc82efed6e54724af3be0badc745e4d 3 | timeCreated: 1736011142 -------------------------------------------------------------------------------- /Editor/VRChat/PlayerHeights.cs: -------------------------------------------------------------------------------- 1 | #if VRC_SDK_VRCSDK3 && UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using hackebein.objecttracking.utility; 5 | 6 | namespace hackebein.objecttracking.vrchat 7 | { 8 | public class PlayerHeight 9 | { 10 | public int Index { get; } 11 | public string DisplayText { get; } 12 | public double CmValue { get; } 13 | 14 | public PlayerHeight(int index, string displayText, double cmValue) 15 | { 16 | Index = index; 17 | DisplayText = displayText; 18 | CmValue = cmValue; 19 | } 20 | } 21 | 22 | public static class PlayerHeights 23 | { 24 | public static readonly List List; 25 | static PlayerHeights() 26 | { 27 | List = new List(); 28 | int index = 0; 29 | 30 | // Add inch-based measurements (3' 0" to 8' 0") 31 | for (int inches = 3 * 12; inches <= 8 * 12; inches++) 32 | { 33 | int feet = inches / 12; 34 | int remainingInches = inches % 12; 35 | double cm = Math.Round(inches * 2.54, 2); 36 | string display = $"{feet}' {remainingInches}\""; 37 | List.Add(new PlayerHeight(index++, display, cm)); 38 | } 39 | 40 | // Add cm-based measurements (92 to 243 cm) 41 | for (int cmInt = 92; cmInt <= 243; cmInt++) 42 | { 43 | string display = $"{cmInt} cm"; 44 | List.Add(new PlayerHeight(index++, display, cmInt)); 45 | } 46 | } 47 | 48 | public static PlayerHeight GetClosest(double cmValue) 49 | { 50 | PlayerHeight closest = List[0]; 51 | double closestDiff = Math.Abs(closest.CmValue - cmValue); 52 | for (int i = 1; i < List.Count; i++) 53 | { 54 | double diff = Math.Abs(List[i].CmValue - cmValue); 55 | if (diff < closestDiff) 56 | { 57 | closest = List[i]; 58 | closestDiff = diff; 59 | } 60 | } 61 | return closest; 62 | } 63 | public static PlayerHeight GetCurrentHeight() 64 | { 65 | double cmValue = RegistryReader.ReadRegistryRawQword( 66 | RegistryReader.HKEY_CURRENT_USER, 67 | @"Software\VRChat\VRChat", 68 | UnityHelper.AddHashToKeyName("PlayerHeight"), 69 | 1.7 70 | ) * 100; 71 | return GetClosest(cmValue); 72 | } 73 | } 74 | } 75 | #endif 76 | -------------------------------------------------------------------------------- /Editor/VRChat/PlayerHeights.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6518d20c5d9d436fad7757605a623acb 3 | timeCreated: 1735322795 -------------------------------------------------------------------------------- /Editor/hackebein.objecttracking.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hackebein.ObjectTracking.Editor", 3 | "references": [ 4 | "Unity.XR.OpenVR", 5 | "Unity.XR.OpenVR.Editor", 6 | "VRC.SDK3A", 7 | "VRC.SDK3A.Editor", 8 | "VRC.SDKBase", 9 | "VRC.SDKBase.Editor" 10 | ], 11 | "includePlatforms": [], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": false, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [], 18 | "versionDefines": [ 19 | { 20 | "name": "com.vrchat.avatars", 21 | "expression": "", 22 | "define": "VRC_SDK_VRCSDK3" 23 | } 24 | ], 25 | "noEngineReferences": false 26 | } -------------------------------------------------------------------------------- /Editor/hackebein.objecttracking.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f14705d6110805f4b95fa08a4b01bb39 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3426ebcb3ed4fac4ba6c09e346221826 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3852380bf8544dfa8145496a81d782f0 3 | timeCreated: 1700020732 -------------------------------------------------------------------------------- /Prefab/ByModelNumber.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95cc7af06eb84a7689adb8cc6088bad3 3 | timeCreated: 1735520017 -------------------------------------------------------------------------------- /Prefab/ByModelNumber/logitech_raw_stylus_v4_0.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/logitech_raw_stylus_v4_0.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/logitech_raw_stylus_v4_0.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aeb7233e640a1754498e5a164a792064 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/ByModelNumber/tundra_tracker.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/tundra_tracker.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/tundra_tracker.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffb8042a3700c9d478893559c37a9458 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_3_0_mv.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/vive_tracker_3_0_mv.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_3_0_mv.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6ff520bcd9eb53438ce4edc8ab1e703 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_mv.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/vive_tracker_mv.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_mv.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39074f88c1f27ab4996650d49830a6e7 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_pro_mv.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/vive_tracker_pro_mv.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_pro_mv.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95d6066285e311a4780e9e9b6e0b5a8f 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_pvt.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/ByModelNumber/vive_tracker_pvt.fbx -------------------------------------------------------------------------------- /Prefab/ByModelNumber/vive_tracker_pvt.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c53a90f0d29074a46bb86286294c3246 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/Gizmo.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Gizmo.fbx -------------------------------------------------------------------------------- /Prefab/Gizmo.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff8dc4849228a6548a5a50255f3bb6c0 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/GizmoUnity.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/GizmoUnity.fbx -------------------------------------------------------------------------------- /Prefab/GizmoUnity.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc31f4d7ebe696a4e88955e98615458e 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 0.04 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 0.0004 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/HTC Vive 2.0.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/HTC Vive 2.0.fbx -------------------------------------------------------------------------------- /Prefab/HTC Vive 2.0.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e61ef84b15a15f4f9d81cff6e41af78 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/HTC Vive 3.0.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/HTC Vive 3.0.fbx -------------------------------------------------------------------------------- /Prefab/HTC Vive 3.0.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca14a135b5798da4e86fb583603b7b6e 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/Logitech VR Ink Stylus.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Logitech VR Ink Stylus.fbx -------------------------------------------------------------------------------- /Prefab/Logitech VR Ink Stylus.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb387caf572de424fa09ebcc21296c2a 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 1 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/MissingModels.md: -------------------------------------------------------------------------------- 1 | * Knuckles Left 2 | * Knuckles EV3.0 Left 3 | 4 | * Knuckles Right 5 | * Knuckles EV3.0 Right 6 | 7 | * Vive Controller MV 8 | * Vive. Controller MV 9 | 10 | * VIVE Controller Pro MV 11 | 12 | Index HMD? 13 | * Utah MP 14 | 15 | Vive HMD? 16 | * Vive MV 17 | * Vive. MV 18 | * REF-HMD 19 | 20 | Vive Pro HMD? 21 | * Vive_Pro MV 22 | 23 | Vive Pro 2 HMD? 24 | * VIVE_Pro 2 MV -------------------------------------------------------------------------------- /Prefab/MissingModels.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ccad780ca12c9447b6ced12d0ef2537 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker screw rotated.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Tundra Labs Tundra Tracker screw rotated.fbx -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker screw rotated.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0da184197c32ae4fa4d930bc5bf0d08 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker screw.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Tundra Labs Tundra Tracker screw.fbx -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker screw.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ea2f2a5caa90c84b92da6bcf06e1f26 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker strap.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Tundra Labs Tundra Tracker strap.fbx -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker strap.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 845b044e978ab7e43b62ff38a653b75e 3 | ModelImporter: 4 | serializedVersion: 22200 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 2 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | removeConstantScaleCurves: 0 18 | motionNodeName: 19 | rigImportErrors: 20 | rigImportWarnings: 21 | animationImportErrors: 22 | animationImportWarnings: 23 | animationRetargetingWarnings: 24 | animationDoRetargetingWarnings: 0 25 | importAnimatedCustomProperties: 0 26 | importConstraints: 0 27 | animationCompression: 1 28 | animationRotationError: 0.5 29 | animationPositionError: 0.5 30 | animationScaleError: 0.5 31 | animationWrapMode: 0 32 | extraExposedTransformPaths: [] 33 | extraUserProperties: [] 34 | clipAnimations: [] 35 | isReadable: 0 36 | meshes: 37 | lODScreenPercentages: [] 38 | globalScale: 1 39 | meshCompression: 0 40 | addColliders: 0 41 | useSRGBMaterialColor: 1 42 | sortHierarchyByName: 1 43 | importPhysicalCameras: 1 44 | importVisibility: 1 45 | importBlendShapes: 1 46 | importCameras: 1 47 | importLights: 1 48 | nodeNameCollisionStrategy: 1 49 | fileIdsGeneration: 2 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | keepQuads: 0 54 | weldVertices: 1 55 | bakeAxisConversion: 0 56 | preserveHierarchy: 0 57 | skinWeightsMode: 0 58 | maxBonesPerVertex: 4 59 | minBoneWeight: 0.001 60 | optimizeBones: 1 61 | meshOptimizationFlags: -1 62 | indexFormat: 0 63 | secondaryUVAngleDistortion: 8 64 | secondaryUVAreaDistortion: 15.000001 65 | secondaryUVHardAngle: 88 66 | secondaryUVMarginMethod: 1 67 | secondaryUVMinLightmapResolution: 40 68 | secondaryUVMinObjectScale: 1 69 | secondaryUVPackMargin: 4 70 | useFileScale: 1 71 | strictVertexDataChecks: 0 72 | tangentSpace: 73 | normalSmoothAngle: 60 74 | normalImportMode: 0 75 | tangentImportMode: 3 76 | normalCalculationMode: 4 77 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 78 | blendShapeNormalImportMode: 1 79 | normalSmoothingSource: 0 80 | referencedClips: [] 81 | importAnimation: 1 82 | humanDescription: 83 | serializedVersion: 3 84 | human: [] 85 | skeleton: [] 86 | armTwist: 0.5 87 | foreArmTwist: 0.5 88 | upperLegTwist: 0.5 89 | legTwist: 0.5 90 | armStretch: 0.05 91 | legStretch: 0.05 92 | feetSpacing: 0 93 | globalScale: 1 94 | rootMotionBoneName: 95 | hasTranslationDoF: 0 96 | hasExtraRoot: 0 97 | skeletonHasParents: 1 98 | lastHumanDescriptionAvatarSource: {instanceID: 0} 99 | autoGenerateAvatarMappingIfUnspecified: 1 100 | animationType: 2 101 | humanoidOversampling: 1 102 | avatarSetup: 0 103 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1 104 | importBlendShapeDeformPercent: 1 105 | remapMaterialsIfMaterialImportModeIsNone: 0 106 | additionalBone: 0 107 | userData: 108 | assetBundleName: 109 | assetBundleVariant: 110 | -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hackebein/Object-Tracking-Unitypackage/341f22d3206ab1d585eefc37a1f892361d13eb84/Prefab/Tundra Labs Tundra Tracker.fbx -------------------------------------------------------------------------------- /Prefab/Tundra Labs Tundra Tracker.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ea913fedf6a1914181a86d73cf84dcf 3 | ModelImporter: 4 | serializedVersion: 19301 5 | internalIDToNameTable: [] 6 | externalObjects: {} 7 | materials: 8 | materialImportMode: 1 9 | materialName: 0 10 | materialSearch: 1 11 | materialLocation: 1 12 | animations: 13 | legacyGenerateAnimations: 4 14 | bakeSimulation: 0 15 | resampleCurves: 1 16 | optimizeGameObjects: 0 17 | motionNodeName: 18 | rigImportErrors: 19 | rigImportWarnings: 20 | animationImportErrors: 21 | animationImportWarnings: 22 | animationRetargetingWarnings: 23 | animationDoRetargetingWarnings: 0 24 | importAnimatedCustomProperties: 0 25 | importConstraints: 0 26 | animationCompression: 1 27 | animationRotationError: 0.5 28 | animationPositionError: 0.5 29 | animationScaleError: 0.5 30 | animationWrapMode: 0 31 | extraExposedTransformPaths: [] 32 | extraUserProperties: [] 33 | clipAnimations: [] 34 | isReadable: 1 35 | meshes: 36 | lODScreenPercentages: [] 37 | globalScale: 1 38 | meshCompression: 0 39 | addColliders: 0 40 | useSRGBMaterialColor: 1 41 | sortHierarchyByName: 1 42 | importVisibility: 1 43 | importBlendShapes: 1 44 | importCameras: 1 45 | importLights: 1 46 | fileIdsGeneration: 2 47 | swapUVChannels: 0 48 | generateSecondaryUV: 0 49 | useFileUnits: 1 50 | keepQuads: 0 51 | weldVertices: 1 52 | preserveHierarchy: 0 53 | skinWeightsMode: 0 54 | maxBonesPerVertex: 4 55 | minBoneWeight: 0.001 56 | meshOptimizationFlags: -1 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 1 63 | tangentSpace: 64 | normalSmoothAngle: 60 65 | normalImportMode: 0 66 | tangentImportMode: 3 67 | normalCalculationMode: 4 68 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 69 | blendShapeNormalImportMode: 2 70 | normalSmoothingSource: 0 71 | referencedClips: [] 72 | importAnimation: 1 73 | humanDescription: 74 | serializedVersion: 3 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | globalScale: 1 85 | rootMotionBoneName: 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | autoGenerateAvatarMappingIfUnspecified: 1 91 | animationType: 2 92 | humanoidOversampling: 1 93 | avatarSetup: 0 94 | additionalBone: 0 95 | userData: 96 | assetBundleName: 97 | assetBundleVariant: 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hackebein's Object Tracking 2 | Track your real objects and track them in VRChat. All SteamVR/OpenVR supported trackers are supported. [Demo](https://x.com/Hackebein/status/1817729114142343460) 3 | 4 | Needs App. Available on: 5 | * [Steam](https://store.steampowered.com/app/3140770) (soon1) 6 | * [Github](https://github.com/Hackebein/Object-Tracking-App/releases) 7 | 8 | 1 beta keys can be requested via support 9 | 10 | Hackebein's VPM Listing: [vpm.hackebein.dev](https://vpm.hackebein.dev) 11 | 12 | ## Support 13 | * [Hackebein's Research Lab](https://discord.gg/AqCwGqqQmW) at discord.gg 14 | 15 | ### Project Overview 16 | [Task Overview](https://github.com/users/Hackebein/projects/4) 17 | 18 | ## Versions 19 | Everything before version 1.0 is to be seen as pre-release. 20 | 21 | ### Pre-release 22 | Pre-releases are essentially test versions that have undergone less rigorous testing and may contain bugs. These versions have limited compatibility and are typically designed to work only with the latest provided App version. 23 | 24 | ## Setup 25 | * Add VPM Listing: [vpm.hackebein.dev](https://vpm.hackebein.dev) to VCC 26 | * Add VPM "Hackebein's Object Tracking" to your Project (not "Hackebein's Object Tracking Setup") 27 | * Add Empty Game Object as child to your Avatar 28 | * Add "Hackebein's Object Tracking Base Component" to the GameObject 29 | * Start SteamVR, if it's not running 30 | * Generate (missing) Playspace 31 | 32 | ### Base Component 33 | ![Base Component](Docs/base_component.png) 34 | 35 | Recommendation: Start SteamVR to use live editing tools. 36 | Hint: Wake your Headset up if Tracker are not updating. 37 | 38 | #### Transform 39 | Position, Rotation and Scale are frozen. 40 | 41 | #### Base Component 42 | **Generate (missing) PlaySpace**: Generates new Game Objects for Trackers which are not on your ignore list. 43 | 44 | **In Editor FPS**: Limits/Unlimits FPS in Scene View. 45 | 46 | **Add Menu**: Adds Automatic generated Menu. 47 | 48 | **Ignore**: Adds Tracker to Ignore list. Ignored Trackers will not be generated by pressing "Generate (missing) PlaySpace". 49 | 50 | **Enable/Active**, **Remove**: Proxy buttons from Tracker Component. 51 | 52 | **Identifier**-Dropdown: Quick selection 53 | 54 | **Update Once**: Updates on next scene draw. 55 | 56 | **Update Continuously**: Updates on every scene draw 57 | 58 | ### Tracker Component 59 | ![Tracker Component](Docs/tracker_component.png) 60 | 61 | #### Transform 62 | Position and Rotation are controlled by Component if Update Once/Continuously gets applied. Otherwise free to change. 63 | Scale is Real to VR multiplier. Make sure your Real Height in VRChat is set before uploading! 64 | 65 | #### Tracker Component 66 | 67 | **Enable**: Enables Tracker 68 | 69 | **Active**(green): Disables Tracker 70 | 71 | **Remove**: Removes Tracker 72 | 73 | **Identifier**: Identifier for OSC 74 | 75 | **Position Damping**: Smoothes position. Values from 0.00 (0%) to 1.00 (100%) 76 | 77 | **Rotation Damping**: Smoothes Rotation. Values from 0.00 (0%) to 1.00 (100%) 78 | 79 | **Hide Beyond Limits**: Hides the objects beyond the remote/yellow, as well as beyond the local/red area 80 | 81 | 82 | ## In-Game 83 | 84 | ### Stabilization Modes 85 | 86 | **Stabilization Off**: 87 | 88 | **Stabilization Lazy**: In Lazy Mode an world drop is placed when you stop using your Thumbsticks to move. This is automated. It's not synced for late joiners. Positions can slightly variate. 89 | 90 | **Stabilization On**: In On Mode, you take an automated jump or step forward to orientate playspace. It's recommended to not look to far up/down and to not move your head left/right for 1-2s after toggling On. 91 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b31628eb6034fc74590fc941834ce579 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hackebein.objecttracking", 3 | "displayName": "Hackebein's Object Tracking", 4 | "version": "0.6.16", 5 | "description": "Hackebein's setup for Object Tracking in VRChat", 6 | "gitDependencies": {}, 7 | "vpmDependencies": { 8 | "com.vrchat.avatars": ">=3.7.0" 9 | }, 10 | "author": { 11 | "name": "Hackebein", 12 | "email": "hackebein@gmail.com", 13 | "url": "https://hackebein.de" 14 | }, 15 | "license": "GPL-3.0-only", 16 | "licensesUrl": "https://github.com/Hackebein/Object-Tracking-Unitypackage/raw/main/Packages/hackebein.objecttracking/LICENSE", 17 | "documentationUrl": "https://github.com/Hackebein/Object-Tracking-Unitypackage/blob/main/README.md", 18 | "changelogUrl": "https://github.com/Hackebein/Object-Tracking-Unitypackage/blob/main/CHANGELOG.md", 19 | "unity": "2022.3" 20 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b15030045fda3914f9b2641f7c4cf3e7 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------