When using a scaled canvas in Unity, it will adapt pixels to fit the screen, so we get effects like this:
The above is a Horizontal layout group with 2px padding, but this only works at the reference resolution of 1920x1080:
Other resolutions it can appear like the first image above, where some of the bars are displayed differently even though they are the exact same size.
Is there any way I can solve this? Using a Constant pixel size canvas is not an option. Using pixel perfect canvas does not solve the issue.
When using a scaled canvas in Unity, it will adapt pixels to fit the screen, so we get effects like this:
The above is a Horizontal layout group with 2px padding, but this only works at the reference resolution of 1920x1080:
Other resolutions it can appear like the first image above, where some of the bars are displayed differently even though they are the exact same size.
Is there any way I can solve this? Using a Constant pixel size canvas is not an option. Using pixel perfect canvas does not solve the issue.
Using a scaled canvas, causes Unity to adapt pixels to fit the screen. This can cause imperfections as is seen in your case.
Here are some options:
ensures your pixel art remains crisp and clear at different resolutions, and stable in motion.
Please inform how it goes!