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

Universal apps - screen resolution v screen dimensions

Discussion in 'Windows' started by sstrong, Aug 18, 2014.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,189
    How can I test if the device is running Windows Phone 8.1 rather than Windows 8.1 on a tablet? The Nokia Lumia 930 runs at 1920x1080 so just checking screen resolution doesn't indicate screen dimensions. For example, on a 11.6 tablet text, menus etc can look fine, but on a 5in phone they are unreadable.

    How can I detect the difference and adjust accordingly?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
  3. jotapeh_

    jotapeh_

    Joined:
    Nov 16, 2012
    Posts:
    45
    The above is correct, particularly if you are dealing with presentation layout specifically - but your original question implies you are running into a platform define issue since UNITY_METRO now includes Windows Phone 8.1.

    So just in case you're looking for a WP8.1 specific platform define, you can use UNITY_WP_8_1 which covers Windows Phone 8.1 but not Windows Phone 8 or Windows 8.
     
    pumpkinszwan likes this.
  4. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,189
    Yes, the define narrowed down to only Phone 8.1. However, the DPI doesn't seem correct. The Lumia 930 reports as from Unity as 249.6 dpi, but the phone is rated as 446 ppi.

    re looking for a WP8.1 specific platform define, you can use UNITY_WP_8_1 which covers Windows Phone 8.1 but not Windows Phone 8 or Windows 8.[/QUOTE]