Forum Discussion
robotloveskitty
11 years agoHonored Guest
NonVR windowed + Direct\Extended VR mode in the same build?
Our game Legend of Dungeon has an awesome VR mode... but it's a serious pain to use.
I am using sdk 0.4.4
Every time I go to build the project, something in the OVR sdk resets D3D11 Force Exclusive Mode to enabled. Which is probably great in most cases as I can't get the rift build to work without it.... but it also completely disables windowed mode, which a lot of our players like.
How do I get Windowed mode, Extended mode and Direct mode all working from one build?
I know I can make a shortcut on my machine and force D3D11, but I can't distribute it like that.
I am using sdk 0.4.4
Every time I go to build the project, something in the OVR sdk resets D3D11 Force Exclusive Mode to enabled. Which is probably great in most cases as I can't get the rift build to work without it.... but it also completely disables windowed mode, which a lot of our players like.
How do I get Windowed mode, Extended mode and Direct mode all working from one build?
I know I can make a shortcut on my machine and force D3D11, but I can't distribute it like that.
11 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffWhich Unity version are you using? If you update to 4.6.1, D3D11 exclusive mode should still allow you to run windowed. You'll also need to rename OVRManager.Start to "OnEnable" to allow toggling of VR after the app has started. Then you can just disable the OVRCameraRig GameObject and enable a plain Camera GameObject without VR support. If you can't upgrade, you can still write a script that disables PlayerSettings.d3d11FullscreenMode when not using VR.
- robotloveskittyHonored GuestAh! I'm in 4.6.0 I'll update :D
- robotloveskittyHonored GuestUnfortunately, 4.6.1 did not solve the issue.
With OVRManager disabled and D3D11 Force Exclusive mode enabled, the game still launches in full screen. Changing from fullscreen to windowed mode causes the game to lock up, where as in 4.6.0 it just stayed fullscreen.
Is there something I'm missing? - vrdavebOculus StaffThat shouldn't happen. Is there an error in the log? You can prevent the game from launching full-screen by disabling "Optimize Builds for Rift" in Edit > Preferences > Oculus VR.
- robotloveskittyHonored GuestOk, what's really weird is, that's already unchecked.
I'll try to reproduce it and see if anything is in the logs. - robotloveskittyHonored GuestI've tried it in all kinds of configurations. Changing resolution in non-vr mode with force d3d11 causes the game to lock up. Specifically, it no longer accepts input, is stuck in fullscreen with a black or sometimes frozen screen, with the in game music still playing in the background. Pressing alt-f4 does nothing. Alt-tabbing makes it even worse, as i can see my desktop but can't interact with anything. I have to hook up my second monitor, ctrl-shift-esc open the task manager and win-arrow key it over to the second monitor to close the program there.
._.
There is nothing in any of the log files, everything there acts as if nothing went wrong. - vrdavebOculus StaffTo run the game in VR mode, you need to enable OVRManager and have users run _DirectToRift.exe. To run in non-VR mode, disable OVRManager and have users run the plain binary. If you're using the latest version of Unity and the Oculus integration, mode switches shouldn't cause black screens or hangs if these two settings match up. It sounds like you are getting a graphics driver crash, which could happen if OVRManager was enabled when it shouldn't be. But there are a lot of reasons the game could hang in non-VR mode.
- robotloveskittyHonored Guest
"vrdaveb" wrote:
To run the game in VR mode, you need to enable OVRManager and have users run _DirectToRift.exe. To run in non-VR mode, disable OVRManager and have users run the plain binary.
Okay, that's what I've been doing, I was hoping the game could also run in extended mode, but it sounds like it just can't. Maybe there is some kind of hardware limitation here? But I would really like to see a single binary run extended VR and nonVR modes someday.
As for the other lockups I'll try updating graphics drivers and test on a few other machines and see what happens. - zulmanHonored GuestHi guys :)
If you can't upgrade, you can still write a script that disables PlayerSettings.d3d11FullscreenMode when not using VR.
How it can be if PlayerSettings is Editor class ?) Is it possible to switch mode in runtime (single exe for VR/Not VR) after OVRDisplay.isPresent already checked? Thank you. - BloodimirHonored Guestrobotloveskitty
To disable d3d11ForceExclusiveMode go to OVRShimLoader.cs and comment code:
PlayerSettings.d3d11ForceExclusiveMode = useExclusiveModeD3D11;
After this your app will launch in windowed mode.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago
- 24 days ago