I’m developing a 2D game here and there is one big mystery with Unity remaining (well, actually there are a few more).
How do we make sure that our game loads 1x, 2x, 3x etc resolution imagery as needed for each device screen resolution? For instance, a 3x image squeezed down at runtime to 1x on an iPad mini does NOT look good. Even a 2x squeezed down to 1x does not look very good at all…
iOS can select the appropriate image resolution for a given device if you append “@2x” or “@3x” to the filename. So if your original image at 1x resolution is named water.png, you should bundle the higher res versions as water@2x.png and water@3x.png. More info here.
No, Unity doesn’t support anything like that. There are no .png files used at all, aside from importing into the editor. I haven’t had issues with just scaling things down.
So every developer who wants to provide 2D assets need to somehow invent this? I believe for other mobile platforms as well you need to provide 2D assets in multiple resolutions in order to have a crisp result. In some cases autoscaling big art down to fit on tiny screen resolutions might work but in many cases not, especially if you target iOS where you need to provide 3x, 2x, and 1x assets.
Yes, you’re absolutely correct. When it comes to textures and 2D, you’re on your own as far as handling different DPIs. The easiest solution would be to invest in buying 2D Toolkit. It has support for this feature and much, much more. Worth every penny.