I am working on an application that I want to be able to use without and with virtual reality (with a Windows Mixed Reality HMD like the Samsung Odyssey).
For non-VR, I simply use a canvas in "Screen Space – Camera" and a second camera, which is a child of the main camera and can only see the user interface (the main camera can see everything except the user interface). In this way, the menus are displayed as transparent overlays always visible to the player (with the game scene in the background).
For virtual reality, you must use World Space. It makes sense because I want to be able to look around without the menu moving too.
How do you now make an example? break menu works in VR and non-VR – depending on whether the player plugs his headphones before launching the application or not?
- Do you change the screen space to global space in the code when running if there is an HMD?
- Do I have to move the entire canvas at run time to where the player is? You want the menu to be in front of the player, no matter where it is, but it must also be in front of other objects in the scene, so you can interact with it.
I am using Unity 2017.3 with OpenVR / SteamVR.