Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ExtremeToast's avatar
ExtremeToast
Honored Guest
10 years ago

Getting Oculus Screen Size

Hello,

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.width
is 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