Lock Screen Orientation with Virtual Reality Enabled (Cardboard).

Hi there!

I’m trying to lock the screen orientation for various scenes within my Cardboard app, but the following line isn’t working for me.

Screen.orientation = ScreenOrientation.LandscapeLeft;

I believe this may have something to do with Virtual Reality Support being enabled, given it greys out all of the screen orientations in the build settings once enabled.

I’ve tried running VRSettings.enabled = false; prior to trying to lock the screen but that also doesn’t seem to work.

Any advice please!?

Thanks

I also have this problem. In my cardboard app some screens are ran in “none” for the virtual reality sdk setting and they need the orientation locked.