Forum Discussion
saviornt
11 years agoProtege
Nerf you Screen class
Where is the bloody class that will allow me to send the game to a specific display and set it to fullscreen / windowed + resolution types as well as enumerate(?) the devices. :evil:
I would LIKE to let people w/o a Rift to play my (potential) game. It would be beef if, on startup, they could choose "Desktop Mode" or "VR Mode".. this would in turn activate which playerController they would be using (Normal vs Rift controllers)
I would LIKE to let people w/o a Rift to play my (potential) game. It would be beef if, on startup, they could choose "Desktop Mode" or "VR Mode".. this would in turn activate which playerController they would be using (Normal vs Rift controllers)
5 Replies
Replies have been turned off for this discussion
- drashHeroic ExplorerYou won't need to fiddle with displays/windows/resolutions if all you're looking to do is toggle between Rift mode and non-stereoscopic normal monitor mode. You'll just need a mechanism to activate an OVRCameraController and deactivate a standard Camera, and vice versa.
Not sure what you'd do with an OVRPlayerController though, I haven't really used that.
Anyway if you want to change resolution at runtime, use the Screen.SetResolution() method. - saviorntProtegeFrom all of the demos that I've seen on youtube, the demo has to be dragged over to the rift (extended desktop). I'm wanting to avoid and just have the game go directly to the Full-Screen + Oculus Rift while in "VR mode", or if the user chooses "desktop" mode, then it will go Full-Screen + Primary Monitor.
EDIT: GDMIT, I went to go grab a smoke, on the first step, I realized something..
CLONE THE !@#% DISPLAYS GDMIT, NOT EXTEND IT - cyberealityGrand ChampionYou can also use the -Adapter option to have the game open on the Rift as a secondary monitor.
Just make a shortcut to your game exe, then add the following to the target field.-Adapter 1
The number may be different depending on your system (ie 0 or 2) but 1 works most of the time. - saviorntProtegeUnfortunately, that would only do 1/2 of what I wanted to do. The game will have 2 different player controllers.
- Monitor
-> First person camera controller
- Rift
-> OVRPlayerController
There are alot of hints on how to do this in a Windows environment, but close to nothing that I've seen on Linux nor OSX environments. - sh0v0rProtegeUnity doesn't currently support display device enumeration, which is one of my #1 feature wishes.
I think expecting people to know to add the '-adapter #' commandline isn't a good user experience and really needs to be addressed. There will be lots of people buying the hardware and expecting it to be a streamlined plug and play experience.
Regarding running your game in Rift or Normal mode you can check the OVRDevice class to see if there are any sensors. I do this in Lunar Flight, if the rift is disconnected from the USB the sensors are zero. I don't give the option to select the mode you want yet so I just force Rift mode if it is connected.
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
- 28 days ago
- 3 months ago
- 7 months ago
- 2 months ago
- 4 months ago