Hello everyone,
Im currently working on a windows exe. where 1 user can controll inputs with touch or mouse, while a second user can conect via a XR HMD. You can think of it as a local multiplayer (its not but you get the idea).
I have done this before, last time with:
Unity 2021.3.11f1 / OpenXR 1.4.2 / Interaction Toolkit 2.0.4
since its a HDRP project i chose to update for this one to a newer Unity version because of all the Raytracing Performance increases.
The current project is with:
Unity 2022.2.15f1 / OpenXR 1.7.0 / Toolkit 2.3.1
The setup im running is one complete XR rig, with handtracking and controller other than very similiar in the general structure to the "Complete XR Origin Hands Set Up" that is part of the interaction toolkit. So only one "MainCamera" rendering to screen 1, with depth 0
The second user, the 2D user has an individual player manager with a seperate camera, also rendering to screen 1
Now as soon as i disconnect the headset my FPS drop from around 89 to 3, and the main change i can see is that the "XR.Display.PopulateNextFrameDesc250.18ms" increases by this amount.
I tryed detecting the disconnection from the HMD but i can only detect its connection not the disconnection. I think that there is something still trying to access the HMD even after it beeing disconnected.
I tryed this the following 2 ways:
void OnDeviceChanged(UnityEngine.InputSystem.InputDevice device, InputDeviceChange change)
if (device is UnityEngine.InputSystem.XR.XRHMD && change == InputDeviceChange.Added)