- Home /
Unity 2D: Pixel Perfect Camera + Resolution Help
Hello, I am aware that there are many guides and questions relating to pixel perfect sprites in Unity, but I have not found an answer that fixes my problem.
While I am able to create a pixel perfect setup for one resolution, if I change to full screen or want to change the window size (while maintaining the same aspect ratio) I am unable to do it successfully.
Many answers are to alter the orthographic camera size according to the dimensions of your screen, but this also changes how much of the scene can be viewed in the window. Unfortunately, this is not an option for my game as regardless of the resolution, the same game area must be able to be seen.
What I need: To be able to change window sizes within a particular aspect ratio (4:3) and keep pixels square (without stretching), while not altering the orthographic camera size as the same area of the game must be viewable regardless of window size.
If I was unable to properly explain my problem or if anyone needs clarification, just ask.
Any replies/suggestions are welcome.
Thanks.
There is a freet asset called PixelPerfectCamera, have you checked it out?
Hello, thank you for the reply, after working with the script, I was able to achieve what I needed. Thanks.