Search Unity

Bug How does the Dedicated Server build get screen size?

Discussion in 'Dedicated Server' started by CDF, Apr 4, 2023.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Curious to know how a dedicated server build gets information about screen size?

    I posted a question about this in another forum that didn't get a response:
    https://forum.unity.com/threads/dedicated-server-build-screen-size.1287323/

    I've tested outputting the screen size when running the server build on my windows machine and also from playfab. The screen sizes are different:

    Windows: 1904x984
    Playfab: 762x533

    Where is this coming from? And can we rely on a dedicated server build having a screen size?
     
  2. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    259
    Hey! I had a quick look at our code and found a discrepancy between Linux, Mac vs Windows: Screen size is zero, as expected, on Linux and Mac Dedicated Servers; while Windows still preservers the Standalone screen size.

    We should fix it, thanks for catching it!
     
    CDF likes this.
  3. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Thanks, that's good info