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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Readying Unity for 2D Pixel Art game - Screen Resolution?

Discussion in '2D' started by ckamarga, Aug 19, 2018.

  1. ckamarga

    ckamarga

    Joined:
    Aug 31, 2013
    Posts:
    15
    Hi everyone,

    I just had a good look around the internet and found some threads about how to set up Unity for a 2D pixel art game, including this Unity blog:

    https://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/

    After following them, I'm not quite satisfied with the results but before I go on, I wanted to confirm some things, most specifically the resolution for my game.

    First of all, this is my Canvas settings for the component Canvas Scaler:

    Canvas_Scaler.PNG

    And this is my Main Camera settings:

    Camera.PNG

    And all my sprites have the following settings:

    Sprites.PNG

    As a result, a 32x32 sprite appears quite small on my screen (which is set to 1920x1080 - which is my monitor's resolution) which makes sense. But I want them to appear larger on screen.

    I was thinking something similar to when the Main Camera's Size was set to 6 instead of 16.875.

    I just don't want to draw a 256x256 character sprite. I want to create 32x32 sprites for my objects but still have them appear reasonably large on screen.

    I want to change the Main Camera Size but all the threads I've read has told me to do ScreenWidth/PPU/2.

    What can I do?
     
    Last edited: Aug 19, 2018
  2. BrienKing

    BrienKing

    Joined:
    Oct 11, 2015
    Posts:
    35
    Not sure how it would look, but you can scale Sprites in the X and Y direction (on the transform). You could set the Scale to 2 and you would have 64x64 sprites. It might look too smooth though, so search for Pixel Perfect settings.
     
  3. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    Set your PPU to 1, and decide on the lowest possible resolution. For example, the SNES has a resolution of 256x224, and because of this, a 32x32 sprite will take up a decent amount of screen space.
    So if your lowest resolution is 1920x1080, then your 32x32 sprites will be insanely small in comparison.
    As for your camera, the orthographic size is half of the vertical resolution, divided by the PPU. So if your vertical resolution is 224, then your orthographic size will be 112 if your PPU is 1.

    With this, your canvas reference resolution should also equal to your base resolution.