linuxer
linuxer

Reputation: 533

Unity VR LandscapeLeft not working in iOS

I am using Unity 5.3.4f1 and I am trying to force certain scenes in my app to be only Landscape Left.

Here is the code segment I am using in the Awake Method

Scene scene = SceneManager.GetActiveScene();
String name = scene.name;
if (name.Equals ("Menu VR")) {
    Screen.orientation = ScreenOrientation.LandscapeLeft;
}

Does it need to be placed elsewhere? It works just fine in android, but will not work on iOS.

Using XCode 8, and the test device is running iOS 10.0.2

Maybe this is a Unity bug? I have also tried with Unity 5.4.1 and it still doesn't work on iOS.

Upvotes: 1

Views: 332

Answers (1)

linuxer
linuxer

Reputation: 533

This has been submitted to Unity and is a known bug. Hopefully a fix will be made soon.

https://issuetracker.unity3d.com/issues/ios-changing-the-screen-orientation-via-a-script-sometimes-results-in-corrupted-view-on-ios-10

Upvotes: 1

Related Questions