Can't disable portrait orientation in Windows Phone 8.1

I feel like I’ve seen this discussed somewhere already but I can’t find the thread now…

I select “Landscape Right” and “Landscape Left” in Unity’s player settings, build the game as a Universal 8.1 Windows Store app, and confirm in Package.appxmanifest that only “Landscape” and “Landscape-flipped” are checked. But when I test on a device and rotate the screen to portrait mode the game rotates with it.

I’ve also tried adding this in MainPage’s OnNavigatedTo:

DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped;

I know there are orientation issues and limitations with the splash screen but I’m having this issue with the game itself.

Any suggestions?

I’m using Unity 5.2.0f3 and VS Community 2015.

I have reported a bug about it. 733548 (Open) Orientation bug on windows phone/store

1 Like

Good to know it’s not just me. :slight_smile:

Hope this is fixed soon. I can’t release my game with a broken portrait mode.

Yes, it is a bug.
There is a workaround however: call the code from the first post in this thread after Unity is initialized (say Awake method in script of your first scene).

1 Like

Thanks Aurimas. I’ll give that a try.