Search Unity

Unity app has wrong initial resolution after upgrade to 2018.2.4f1 and newer.

Discussion in 'Linux' started by jan_bajana, Dec 18, 2018.

  1. jan_bajana

    jan_bajana

    Joined:
    Sep 15, 2015
    Posts:
    22
    Related to Unity Engine 2018.2.4f1 and newer.
    Problem is that an executed application doesn't setup native resolution on the target Linux platform even This is enabled in project settings.
    Player prefs has the wrong config after upgrade to Unity Engine 2018.2.4f1 which doesn't match Unity Player Settings.
    Expected config from previous Unity engines:
    Code (CSharp):
    1.  
    2.     <pref name="Screenmanager Fullscreen mode" type="int">1</pref>
    3.     <pref name="Screenmanager Resolution Height" type="int">768</pref>
    4.     <pref name="Screenmanager Resolution Use Native" type="int">1</pref>
    5.     <pref name="Screenmanager Resolution Width" type="int">2720</pref>
    6.  
    after upgrade to 2018.2.4f1 default is always:
    Code (CSharp):
    1.  
    2.     <pref name="Screenmanager Fullscreen mode" type="int">1</pref>
    3.     <pref name="Screenmanager Resolution Height" type="int">1</pref>
    4.     <pref name="Screenmanager Resolution Use Native" type="int">0</pref>
    5.     <pref name="Screenmanager Resolution Width" type="int">1</pref>
    6.  
    Default is Native Resolution option doesn't persist here even it is checked in Editor Player Settings. In config is always 0.

    The result is that the Unity app has a wrong initial resolution. See logs:
    Code (CSharp):
    1.  
    2. Desktop is 2720 x 768 @ 90 Hz
    3. Invalid initial resolution 1 x 1 - forcing to 100 x 100
    4.  
    after OpenGL is Init it requested full screen with res 1x1:
    Code (CSharp):
    1.  
    2. - Completed reload, in  0.124 seconds
    3. Default vsync count 1
    4. requesting resize 1 x 1
    5. requesting fullscreen 1 x 1 at 0 Hz
    6. Setting up downscaled viewport at 1 x 1
    7. Desktop is 2720 x 768 @ 90 Hz
    8.  
    At the end it is causing this runtime error:
    Code (CSharp):
    1. Screen position out of view frustum (screen pos 0.500000, 0.000000, 100.000000) (Camera rect 1 0 0 1)
    It looks like Unity did some changes in the Resolution Setup since Unity 2018.2.4f1.
    Why Player prefs configuration has wrong values by default? How can I solve it?
    I do not want to force resolution change in runtime.
    I am working on SDK for our device and Unity 2018.2.4f1 is the minimal supported version by our SDK.

    Thank you,
    Jan Bajana
     
    Last edited: Dec 20, 2018
  2. GiedriusUnity

    GiedriusUnity

    Unity Technologies

    Joined:
    Aug 23, 2016
    Posts:
    2
    Hello!

    The bug you posted was tested and fixed on Windows. It may be that the issue persists on Linux. Can you submit a bug report and post the bug # here?

    Also, 2018.2 is no longer supported. I would recommend checking if the issue persists in the latest 2018.3
     
  3. jan_bajana

    jan_bajana

    Joined:
    Sep 15, 2015
    Posts:
    22
    Thank you for your update. I will post the bug report tomorrow. I have tested this issue persists in all 2018.2 versions.
    Looks resolved in 2018.3.
    But in Unity 2018.3 there is currently a bigger blocking issue. Something with C++ standard probably coming from std::getline(). Reported here:
    https://forum.unity.com/threads/lin...e-on-std-getline-from-c-c-native-code.601495/

    So we are not currently compatible with Unity 2018.3 and I don't know how to solve it. It is probably on the Unity side.
     
  4. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    146
    Same problem on 2019.1.3f1...