Reputation: 533
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
Reputation: 533
This has been submitted to Unity and is a known bug. Hopefully a fix will be made soon.
Upvotes: 1