Search Unity

Targeting multiple platforms and resolutions

Discussion in '2D' started by omatase, Aug 31, 2014.

  1. omatase

    omatase

    Joined:
    Jul 31, 2014
    Posts:
    159
    I'm building a hybrid 2D/3D game for which I would like to target web, iOS, Android, desktop. For web I want the resolution of the window to match the common resolution of 1366x768, for desktop I'd like to support the pretty common feature of allowing people to play full screen at a number of different resolutions. For iOS and Android I want to make sure the game will look good on a small screen (not worried about both orientations).

    Right now I'm using screen coordinates (as opposed to world coordinates) to move my 2D objects around. What seems to be odd here for me is that in a resolution of 1024x768 I have a box that I'm trying to line up flush with the top of the screen but when I change the resolution to 19280x1080 the box is slightly off the screen to the top. My biggest worry is that I'm doing something fundamentally wrong when positioning it that I need to correct early on so I don't have a big problem to deal with later.

    But more broadly I just need to know the sort of tips and tricks for coding to support multiple resolutions in Unity. Do I need to provide sprites / models of different sizes or is it fine to rely on the hardware to scale my graphics?Should I provide multiple image ratios for different resolution ratios, etc?