Hi everyone,
I’m developing a high-end game in unity for iOS tablets(we want to support iPad 3 and iPad 2). My problem is that the menu contains a few full screen images and in order to get the high quality on iPad 3, I imported them as
Texture Type: GUI
Filter Mode: Bilinear
Max Size: 2048
Format: Truecolor
and the size of one full image becomes 12.0MB (this is shown on Unity, texture preview) but images are only 3-5MB heavy, the screen in total gets 183.0MB of memory (this is Real Memory displayed in Activity Monitor). This works okay for iPad 3(even that 183.0MB is quite a lot also for iPad 3), this is a nightmare for iPad 2 because it easily gets more memory while on game and crashes very easy.
I researched quite a lot for this and tried a lot of compressions but couldn’t get the desired result. How should this be solved?
Thanks in advance.
Have you tried all the advance setting compression types? PVRTC-4 and all that? True color is very expensive and if it covers the entire screen you might need to do some smaller images and piece them together…but I don’t know how your background is.
Hey DexRobinson, thanks for the reply.
I tried, the advanced setting compressions and the best compression is made when I select “Non power of 2 : ToNearest”. Can you explain me if I need to change the non-squared full screen images (2048x1536) to another resolution? If so, how can I display them in full screen on iPad 3?
Should I try to keep all the images squared and with power of 2 width/height?
Thanks,
Yes all your images should be in powers of two. If they are not they take up a lot more RAM and give you a lot more issues. What you can do is for a 2048x1536 is make a 2048*2048 texture and either make it transparent around the edges(if you need it to have an alpha) or make it black in the missing areas. This way you can keep your screen size resolution and make it a power of 2. Make sense?
Yes but how should I draw that?
Using GUI.DrawTexture with scale and crop or using GUI.BeginGroup and GUI.EndGroup (I heard that this is a pain for iOS because its GUILayout)? Is there any better way like only crop with scaling?
Thanks for answering,
Yeah got similar issue once.
Sound weird… but from the advanced compression settings, if you remove the “ToNearest” attribute from Non Power of 2 settings, it will keep the original size.
Then you do not lose on quality and won’t have stretch too.
Made some huge optimization on app size + memory using this option O_o…