- Home /
SteamVR Make Game have a 3D Scene and VR Scene
I'm currently trying to switch between a VR and a 3D PC screen scene in unity. I am using SteamVR in my project and the XR Plugin Management for trying to do the switching. I tried to use the code from https://docs.unity3d.com/Packages/com.unity.xr.management@4.0/manual/EndUser.html to enable VR in my VR scene and disable VR in my PC scene.
When I start in my PC scene everything works fine, but when I switch to the VR scene I get errors that SteamVR couldn't be initalized and stuff like that...
Also when I start in the VR scene and I switch to the PC scene the camera view gets distorted and the hands from the player prefab (of steam vr) are still visible. When I change back to VR view I again get the error that SteamVR couldn't be initialized and I can't do anything in VR (and the hands stay at the same place)....
I have no idea how to fix this anymore since everything seems so weird. I also tried to disable auto enabling of steam vr and do the enabling manually in the code from the xr management link above but that doesnt work either...
Why can't it be simpler to change between VR and PC....
Anyways thanks for any help on this. How could you easily achieve the switching between vr and pc?
Can't you have just one scene where you enable or disable VR? It sounds like you have two different scenes that you also change between, because you only have one scene Loaded at once?
I use SteamVR in a project from unity 2019.2.10f1, and that works differently so I haven't made the switch yet to XR Plugin (only on Rift and Quest). Also I never switch between PC and VR, only detect noVR at startup, so I'm afraid my project won't help you.
Yeah I have one scene where VR is enabled and one scene where it's disabled. I just dont get SteamVR to start manually... It always gives the following error (even thought my hmd is working and OpenVR Loader is working)... [1]: /storage/temp/192478-screenshot-2022-02-11-155002.png
And Yes maybe it would be an oppurtunity to do everything in the same scene. How would you achieve turning VR on/off?
Sorry, I only detect if VR fails at start I do PC. But it could be possible to enable/disable the right components/plugins...
I tried enabling, disabling of different things for 2 days now... I'm getting so frustrated... Nobody can help...
I am facing exactly the same issue right now. I set up a simple scene and was trying out that teleportation thing. Somehow Unity crashed when exiting playmode. Since then this error comes up everytime I want to enter the playmode. SteamVR is running and is connected to my Quest properly. As my project just was a basic setting, I created a new project and now it works again, but I think it will only be a matter of time that this error comes up again.
Your answer
Follow this Question
Related Questions
[Solved] SteamVR - Replacing the Vive controller texture/model IN Unity? 1 Answer
Camera and objects in steamVR plugin 0 Answers
SteamVR: Eye camera does not seem to support depth only; 3D skybox implementation impossible 1 Answer
First Person Player controller for Steam VR 1 Answer
Editor Crashes When Switching from VR to Standalone 0 Answers