How to fix Oculus Rift Not Tracking in Build, but working in the Unity Editor's Player
My VR Game works great in the Unity Player editor, but the headsets's MainCamera component does not track with the headset and the gameobjects attached to the touch controllers do not seem to track with the controllers either. I hear the game working as expected.
It just displays a fixed 3D image in the scene in the build. Based on some clues below, the Oculus is tracking correctly, it's the devices' attached game objects (MainCamera and meshes) are not moving with them.
Here are my observations:
I have an Oculus Rift with Touch.
I have tracked pose drivers on my characters head and hands created with GameObject-->XR-->Convert MainCamera to Rig.
All scripts compile without warnings or errors in the Editor.
The editor player works excellent - tracking the touch controllers and the headset and moving it's child game objects accordingly.
No warnings or errors are presented when building.
The Player.log file has three messages that may be of concern:
1) [Subsystems] No descriptors matched for examples in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json.
2) [Subsystems] No descriptors matched for meshings in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json.
3) [XR] Error: GetLocalTrackingSpaceRecenterCount failed at OculusSystem::Initialize() : Unsupported
Details
I am building for Windows Standalone DX11, .Net2.0
I have the Oculus VR package and XR Plugin Management package.
The XR Plugin Management is set to Oculus with single pass rendering
When the game is executed after the build, the unity behaves correctly in the VR space as it tracks with the headset.
Once the scene displays, I can move around and see the Guardian red fence pop up.
The Guardian red fence will show the circles in the fence when the controllers breach it's perimeter. This validates tracking is occuring, but no game objects appear at the touch controller positions as designed. There is a fixed image from within the scene.
All of this appears that the Oculus is tracking correctly, but the headset and controllers attached game objects (MainCamera and meshes) are not moving with them.
Here is my full Player.log
Mono path[0] = 'C:/Users/Sean-/Downloads/Software/DeleteMe/Sleepwalker - VR_Data/Managed'
Mono config path = 'C:/Users/Sean-/Downloads/Software/DeleteMe/MonoBleedingEdge/etc'
PlayerConnection initialized from C:/Users/Sean-/Downloads/Software/DeleteMe/Sleepwalker - VR_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55130
Multi-casting "[IP] 192.168.1.197 [Port] 55130 [Flags] 2 [Guid] 3707053263 [EditorId] 3836448572 [Version] 1048832 [Id] WindowsPlayer(HTPC) [Debug] 1 [PackageName] WindowsPlayer [ProjectName] Sleepwalker - VR" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55130]
Starting managed debugger on port 56263
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=0.0.0.0:56263
PlayerConnection already initialized - listening to [0.0.0.0:55130]
Initialize engine version: 2020.3.25f1 (9b9180224418)
[Subsystems] Discovering subsystems at path C:/Users/Sean-/Downloads/Software/DeleteMe/Sleepwalker - VR_Data/UnitySubsystems
[Subsystems] No descriptors matched for examples in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json.
[Subsystems] 1 'inputs' descriptors matched in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json
[Subsystems] 1 'displays' descriptors matched in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json
[Subsystems] No descriptors matched for meshings in UnitySubsystems/OculusXRPlugin/UnitySubsystemsManifest.json.
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: Radeon (TM) RX 480 Graphics (ID=0x67df)
Vendor:
VRAM: 8171 MB
Driver: 30.0.13025.5005
Begin MonoManager ReloadAssembly
- Completed reload, in 0.794 seconds
XRGeneral Settings awakening...
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
UnityEngine.XR.Management.XRGeneralSettings:Awake () (at C:/Users/Sean-/Downloads/Sleepwalker VR 12-17/Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRGeneralSettings.cs:91)
(Filename: C:/Users/Sean-/Downloads/Sleepwalker VR 12-17/Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRGeneralSettings.cs Line: 91)
D3D11 device created for Microsoft Media Foundation video decoding.
[XR] OculusXRPlugin: registering subsystems
[Subsystems] OculusXRPlugin successfully registered Provider for oculus display
[XR] Oculus Input lifecycle provider registered.
[Subsystems] OculusXRPlugin successfully registered Provider for oculus input
[Subsystems] OculusXRPlugin successfully registered Provider for oculus display
[XR] Oculus settings :
Shared Depth Buffer: Yes
Dash Support: Yes
Requested Stereo Rendering Mode Single Pass Instanced
Color Space: Linear
Low Overhead Mode: No
Optimize Buffer Discards: Yes
Phase Sync: No
Subsampled Layout: No
[Subsystems] Loading plugin OculusXRPlugin for subsystem oculus display...
[XR] Error: GetLocalTrackingSpaceRecenterCount failed at OculusSystem::Initialize() : Unsupported
[Subsystems] Loading plugin OculusXRPlugin for subsystem oculus input...
<RI> Initializing input.
<RI> Input initialized.
<RI> Initialized touch support.
[XR] Oculus XR Plugin Display Start
[XR] Unity will render to eye texture(s) of format: Texture Array
[XR] The Oculus eye layer has texture(s) of format: Separate
[XR] Rendering to intermediate textures.
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::SetupRenderTextureFromXRRequest (id: 1 col: 00000292E9D70E38 d: 00000292F0127938 sr: 0000000000000000)
RenderTexture::Create (id: 1)
IVRDeviceCallback_CreateEyeTextureResources 00000292E9D70E38
IVRDeviceCallback_CreateEyeTextureResources 00000292F0127938
XRTextureManager::SetupRenderTextureFromXRRequest (id: 2 col: 00000292E9D6F138 d: 00000292F01280F8 sr: 0000000000000000)
RenderTexture::Create (id: 2)
IVRDeviceCallback_CreateEyeTextureResources 00000292E9D6F138
IVRDeviceCallback_CreateEyeTextureResources 00000292F01280F8
XRTextureManager::SetupRenderTextureFromXRRequest (id: 3 col: 00000292E9D6EEB8 d: 00000292F0127BB8 sr: 0000000000000000)
RenderTexture::Create (id: 3)
IVRDeviceCallback_CreateEyeTextureResources 00000292E9D6EEB8
IVRDeviceCallback_CreateEyeTextureResources 00000292F0127BB8
XRTextureManager::SetupRenderTextureFromXRRequest (id: 4 col: 00000292F01288F8 d: 00000292F0128638 sr: 0000000000000000)
RenderTexture::Create (id: 4)
IVRDeviceCallback_CreateEyeTextureResources 00000292F01288F8
IVRDeviceCallback_CreateEyeTextureResources 00000292F0128638
XRTextureManager::SetupRenderTextureFromXRRequest (id: 5 col: 00000292E9D6E438 d: 00000292F01290B8 sr: 0000000000000000)
RenderTexture::Create (id: 5)
IVRDeviceCallback_CreateEyeTextureResources 00000292E9D6E438
IVRDeviceCallback_CreateEyeTextureResources 00000292F01290B8
XRTextureManager::SetupRenderTextureFromXRRequest (id: 6 col: 00000292F0128B78 d: 00000292F01CC738 sr: 0000000000000000)
RenderTexture::Create (id: 6)
IVRDeviceCallback_CreateEyeTextureResources 00000292F0128B78
IVRDeviceCallback_CreateEyeTextureResources 00000292F01CC738
XRTextureManager::SetupRenderTextureFromXRRequest (id: 7 col: 0000000000000000 d: 0000000000000000 sr: 0000000000000000)
RenderTexture::Create (id: 7)
UnloadTime: 0.987400 ms
Setting up 12 worker threads for Enlighten.
Thread -> id: 18b4 -> priority: 1
Thread -> id: 7a8 -> priority: 1
Thread -> id: 2304 -> priority: 1
Thread -> id: 5e88 -> priority: 1
Thread -> id: 3ef0 -> priority: 1
Thread -> id: 53d8 -> priority: 1
Thread -> id: 5758 -> priority: 1
Thread -> id: 27d8 -> priority: 1
Thread -> id: 416c -> priority: 1
Thread -> id: 2558 -> priority: 1
Thread -> id: 3690 -> priority: 1
Thread -> id: 5d6c -> priority: 1
[XR] Destroying distortion window
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
XRTextureManager::RequestDestroyTexture
[XR] Oculus XR Plugin Display Stop
[XR] Oculus XR Plugin Display Shutdown
##utp:{"type":"MemoryLeaks","version":2,"phase":"Immediate","time":1640097776273,"processId":1804,"allocatedMemory":205771,"memoryLabels":[{"Permanent":40},{"NewDelete":216},{"Thread":144},{"Manager":2288},{"GfxDevice":196744},{"Serialization":456},{"WebCam":32},{"String":1251},{"HashMap":1536},{"PoolAlloc":56},{"GI":344},{"CloudService":1008},{"VR":6928},{"Subsystems":-5272}]}
Your answer
![](https://koobas.hobune.stream/wayback/20220613050809im_/https://answers.unity.com/themes/thub/images/avi.jpg)