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

Griping about pixel perfect camera

Discussion in 'Editor & General Support' started by MosquitoByte, Aug 29, 2020.

  1. MosquitoByte

    MosquitoByte

    Joined:
    Sep 17, 2018
    Posts:
    213
    So, a while ago, in a different thread for another issue, i ended up discovering one. Pixel perfect camera is not nearly as cut-and-dry as their tutorials for it lead you to believe. I've been struggling for over a week now to try to solve just what exactly the deal with it is. It does this weird thing where, to achieve the pixel perfect look, it resizes your camera. Not a problem, right? Well, it wouldn't be, if it weren't for the fact that it has zero consistency on what it wants to change your camera size to. To demonstrate: here are some screenshots.

    https://i.gyazo.com/05336b02889518195173e0c2256daa9c.png

    https://i.gyazo.com/73db9913d0c84e814e192c5dbc16cbf4.png

    https://i.gyazo.com/2e065cb2ff845412e1c5f394954a7f70.png

    as can be seen, the pixel perfect camera, when play mode is active in the editor, resizes the camera to a size which seems to fit the outer, solid green box which is drawn when it's attached to a camera. Certainly a nuisance, but that can be solved by simply having your camera start at that size to begin with. However: that solution comes falling apart as soon as you actually build your game. When you do that, suddenly, it instead chooses to resize the camera to be smaller, the dotted line box. This also happens when setting the resolution in the game window to "Standalone".

    https://i.gyazo.com/7e8a6c46508734bc568f09670c089993.png

    https://i.gyazo.com/0a2b8f2fa87b237df6ef061c67e98092.png

    Whether from Unity devs, or just someone here who knows what's going on here, i want answers. I want to know why it does this, what can be done to fix this, and why in both the documentation and the official tutorial video, they chose to omit any information about this. I don't believe for an instant they didn't come across this themselves.
     
  2. MosquitoByte

    MosquitoByte

    Joined:
    Sep 17, 2018
    Posts:
    213
    I even managed to find a reference resolution that manages to make the inner and outer boxes match size, and yet still the standalone resizes it to be different. What did i do to deserve this?