Forum Discussion
seieibob
13 years agoHonored Guest
[Script] Test your Rift inside the Unity Editor
Hello! I've made an editor script that allows you to work with the Rift in Unity without having to build every time you want to test something. It's designed to work with any HMD, so long as it acts as a separate monitor in the OS you're using. All you need to do is specify where the top-left corner of your Rift is in pixel coordinates, where (0,0) is the top left of your primary monitor.
You can find it under "Window/Set Game Window Position..." in the editor.
I haven't been able to test this on OSX. Please let me know if something doesn't work!
You can find it under "Window/Set Game Window Position..." in the editor.
I haven't been able to test this on OSX. Please let me know if something doesn't work!
19 Replies
Replies have been turned off for this discussion
- MannyLectroExplorerWaow many thanks ! This will come in handy !
- LucidRealityHonored GuestBeautiful! Thanks!
- sbnewsomHonored GuestI just remove the game window from dock and make it fullscreen....but this might make it a bit easier!
- CaliberMengskExplorerO-o I just mirror my main window and maximized on play. Not 100% accurate, but pretty darn good.
- cyberealityGrand ChampionThis is awesome. Thanks.
However, I'm moving it to the Unity forum. - cyberealityGrand ChampionI showed this script to some of the guys here and I think we will want to integrate it into the official SDK.
Great job. - owenwpExpert ProtegeWow, this works great.
And it should be possible to automatically set the right coordinates by querying the device ID from the oculus apis, and then using System.Windows.Forms.Screen or the Win32 display device enumeration callback from within the SDK DLL.
It would be even cooler if the OVRDevice class did all that when you hit play with a Rift connected, for zero config. - seieibobHonored GuestHey, thanks for all your feedback. I'm really excited to possibly see this in the SDK! There are quite a few improvements I can make, which I intend to do.
And it should be possible to automatically set the right coordinates by querying the device ID from the oculus apis, and then using System.Windows.Forms.Screen or the Win32 display device enumeration callback from within the SDK DLL.
It would be even cooler if the OVRDevice class did all that when you hit play with a Rift connected, for zero config.
I hope to do something like this. I wrote this code in an hour, so there's a lot that can be done with it. Now that people are actually seeing code I wrote, I'm a little self-conscious... - AdamsImmersiveHonored GuestThanks, seieibob! Looking forward to seeing the next steps. (No pun intended.)
- zwickarrHonored Guestthanks for making this. this works much better than the crappy one I did!
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
- 4 months ago
- 7 months ago
- 6 months ago