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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Setting Resolution in DeviceSettings.mm 5.1 issues

Discussion in 'iOS and tvOS' started by super77gg, Jul 20, 2015.

  1. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    With unity 5.0.3, we were getting awesome performance on retina iPads when we adjusted the screen size to lower resolutions. For instance we would use the following for our iPad Mini 2nd Gen:

    case deviceiPadMini2Gen:resMult = 0.5f; break;



    However, now when we build with 5.1, our project hangs on the first frame of the screen load if we use a resMult of anything besides 1.0.

    Anyone else run into similar issues or know what might be causing this ?


    Thanks!
     
  2. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    173
    How are changing the resolution? With Screen.SetResolution? Because I've tried this on an Mini 2 with 5.1.2f1 and it seems to be working fine.

    Could you check whether you still get this issue on 5.1.2 and if you do please submit a bug report with the project you're using (just be sure to post the bug id here so that we wouldn't miss it).
     
  3. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    @_Paulius Thanks for getting back so quickly! Appreciate you testing it out.

    We are currently changing the resolution through Xcode only by editing the DeviceSettings.mm file. We'll give it a whirl by adding the code within Unity itself this afternoon and see if that works.
     
  4. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    @_Paulius Heya - Using Screen.SetResolution worked great on our iPad2 and iPad Mini - however, now when we change the resolution on an iPhone 6, it only outputs a black screen. We've filed a bug Report
    #713909
     
  5. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    In case anyone else runs into this issue - I just heard back from Unity support. This is a bug and they've added it to their list. In the mean time the work around is to disable Anti-Aliasing.
     
  6. _Paulius

    _Paulius

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    173
    I looks like that the black screen issue is only caused by Anti-Aliasing, it seems that it's broken on all devices running Metal/ogles3, but changing resolution on any device should work as long as it's disabled.

    Also do you still have the issue with resMult? I tried changing it in DeviceSettings.mm in a project build with 5.1.2p1, but couldn't reproduce the hang up.