Can I make my 2D game's sprites the exact same amount of pixels no matter what resolution the game is running at?

I’m making a game with pixel art, but when I run the game at various resolutions, some of the pixels stretch and it looks really awkward. It works fine on 1024x768.

I found something before that said I could use this to have my game’s sprites pixel perfect:

camera.orthographicSize = Screen.height/2/48;

but that doesn’t make it exact on all resolutions, including my monitor’s native resolution (1600x900).

How can I make it so all resolutions are pixel perfect? Is there a formula I can use?

1 Answer

1

Hi, check out this solution: unity game engine - Unity3D Correct Orthographic Size of Camera - Stack Overflow