Search Unity

Thousand different android devises resolutions handling

Discussion in '2D' started by Kamil-Says, Oct 11, 2016.

  1. Kamil-Says

    Kamil-Says

    Joined:
    Jun 30, 2014
    Posts:
    154
    Hey all, the different resolution handling for android platform confusing me a bit right now.
    Where do I need to be carefull when i'm designing the UI for mobile since the UI scale depends on devise, it becomes pretty ugly if the resolution is higher than the UI is designed for. So how to prevent that? One idea I had was to design the UI in bigger scale but is that correct or is there any other way?

    Another thing, lets's say I have a background sprite image that uses the sprite renderer component. How do I handle the correct position and scale of the sprite for every resolution?

    Thanks,
    Kamil
     
  2. Lotias90

    Lotias90

    Joined:
    Nov 11, 2015
    Posts:
    30
    I found it easiest to change the UI setting to "constant physical size" and play around with the numbers. Going with millimetres and playing around made my UI look pretty much identical on all devices.
     
  3. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    So far I only write games for android, now because I have these devices

    Samsung 10.1 (1280 x 800)
    Nexus 7(1200 x 1920)
    Nexus 9(1536 x 2048)
    Nexus 6(1440 x 2560)

    And some others

    I can cover a lot of different screen size.

    I set my Canvas UI as follows:

    Canvas : Screen Space - Overlay
    Pixel Perfect: checked

    Canvas Scaler: Scale With Screen Size
    Reference Resolution: X = 1440 Y = 2560 'E.g the Nexus 6'
    Screen Match Mode: Shrink
    Reference Pixels Per unity: 100

    Now that the latter end of this pod cast, they do say about game size not much about UI but I thought it might help