Forum Discussion
ExtremeToast
10 years agoHonored Guest
Getting Oculus Screen Size
Hello,
I create a render texture that uses the screen width and height at the start of runtime.
This works great in the editor, in both 2D and VR mode.
However, when I build and run using the standalone player it doesn't work in VR any longer.
I think it is because
Is there a method to retrieve the Oculus screen width and height directly?
Thanks.
I create a render texture that uses the screen width and height at the start of runtime.
var renderTex = new RenderTexture(Screen.width, Screen.height, 24);
This works great in the editor, in both 2D and VR mode.
However, when I build and run using the standalone player it doesn't work in VR any longer.
I think it is because
Screen.widthis referring to the windowed standalone player and not what is displaying on the Oculus.
Is there a method to retrieve the Oculus screen width and height directly?
Thanks.
2 Replies
Replies have been turned off for this discussion
- ExtremeToastHonored GuestI have just figured out the solution
For some reason in the standalone player I have to use:Screen.width/2
I'm not entirely sure why, but it seems to fix my problem. - vrdavebOculus StaffSee https://developer.oculus.com/doc/0.1.0. ... splay.html. You need the eye bugfer size, which is part of the EyeRenderDesc in our Utilities.
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
- 4 months ago
- 1 month ago
- 2 months ago
- 8 days ago