Search Unity

Linux build : crash from fullscreen to window

Discussion in 'Editor & General Support' started by thibautvdumont, Jan 23, 2016.

  1. thibautvdumont

    thibautvdumont

    Joined:
    Oct 6, 2015
    Posts:
    25
    Hi there,

    First, I couldn't find Linux in the Platforms section, so I'm posting my issue here.

    We have a simple toggle to set or unset fullscreen in our game and while it is working great when requesting full screen, requesting window mode crash the application and unity (ubuntu interface) at the same time. The player.log does not contain anything significant :

    Code (CSharp):
    1. requesting resize 1366 x 768
    2. resizing window to 1366 x 768
    3. Desktop is 1366 x 768 @ 60 Hz
    And I couldn't find any issue in our code either :

    Code (CSharp):
    1.     public void SwitchFullScreen(bool fullscreen)
    2.     {
    3.         string isFullScreen = fullscreen ? "IsFullScreen" : "NotFullScreen";
    4.         PlayerPrefs.SetString("FullScreen", isFullScreen);
    5.  
    6.         Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, fullscreen, Screen.currentResolution.refreshRate);
    7.     }
    It seems like the application correctly switch in window mode, however it's a plain night blue and nothing respond anymore. I should precise that there is no issue when the application actually starts in window mode. Would you have any idea ?

    Thanks a lot

    (builds are made with the last version of the ubuntu editor, 5.3.1)