Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can't disable portrait orientation in Windows Phone 8.1 (Universal App)

Discussion in 'Windows' started by skyrusfxg, Feb 11, 2016.

  1. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    Hello! I have the same issue as http://forum.unity3d.com/threads/cant-disable-portrait-orientation-in-windows-phone-8-1.360047/ . My application starts, i see splash screen (landscape orientation) and after some seconds orientation of splash screen becomes portrait. Unity version 5.3.2p3 . My PlayerSettings are:

    PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft;
    PlayerSettings.allowedAutorotateToLandscapeLeft = true;
    PlayerSettings.allowedAutorotateToLandscapeRight = true;
    PlayerSettings.allowedAutorotateToPortrait = false;
    PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;

    Package.appxmanifest has section:

    <m3:InitialRotationPreference>
    <m3:Rotation Preference="landscape" />
    </m3:InitialRotationPreference>

    How can i solve this problem? I need only landscape orientation of splash screen.
     
  2. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    Problem only with splash screen. After it dissapeared, game has landscape orientation.
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Does it happen when application switches from splash screen to MainPage (which contains extended splash screen)?
     
  4. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    Yes, after OnNavigatedTo method called .
     
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Is it Windows Phone 8.1, not Windows Phone 10?
    Also, which Unity version are you on?

    On Windows 10 those orientations in the manifest apply only to splash screen, elsewhere you have to use WinRT API and set supported orientations, so you can do that in the application before navigating to MainPage. On older versions it used to work fine with manifest alone, IIRC.
     
  6. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    "Is it Windows Phone 8.1, not Windows Phone 10?" - Yes, is it Windows Phone 8.1 . I'am making builds to device running on Windows Phone 8.1 OS.

    "Also, which Unity version are you on?" - Unity version 5.3.2p3 . SDK: Universal 8.1 . Visual Studio 2015 Community Update 1.

    Оn my PC Windows 10 OS .
     
  7. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Does forcing orientation by code in the App work?
     
  8. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    I set on Unity side at Awake() Screen.orientation = ScreenOrientation.LandscapeLeft; -> splash screen still rotating (the same behaviour)
     
  9. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127
    Send bug report to Unity with example empty Unity project (only with splash screens): Case 770092
     
  10. skyrusfxg

    skyrusfxg

    Joined:
    Jan 14, 2016
    Posts:
    127