0

I'm making 2d game in Unity with 4k images, need to optimize images for mobile deivces. I've found that android have excellent approach for my case. Just create different folders for screen resolutions (xhdpi, hdpi, mdpi, ldpi) (check link for more information) and publish your game as app bundle. When user will download the game, he will get textures resolution that his device supported and that's super cool and what I exactly need (usefull link about it).

But I can't find any information how to do it in Unity (create images for different resolutions and make smart app bundle). Unity support app bundle, but how to handle different resolution sprites - still mistery for me.

1 Answers1

0

I would recommend using vectors SVG format, they scale to any screen size. Download the Vector Graphics package from the package manager.

https://docs.unity3d.com/Packages/com.unity.vectorgraphics@2.0/manual/index.html

You could also do something like Resources.Load for different texture sizes and load only the ones you want based on screen resolution.

https://docs.unity3d.com/ScriptReference/Resources.Load.html

https://docs.unity3d.com/ScriptReference/Screen-resolutions.html

vasmos
  • 2,472
  • 1
  • 10
  • 21
  • Thanks for anwser, but we are making 2d art style point&click and it's impossible use svg in my case. As I know Resources.Load will take a lot of time on start to load all resources and guys from unity advise avoid resources.load (in production build, it's still usefull for development stage). I had same idea, but use sprite atlas variants. But it looks like a lot of work and doesn't solve problem with final apk size (it will have graphics for all cases and weight too much) – Krblshna May 20 '20 at 16:38