Hello People.
Been using NGUI (3.7.1) for about a month now and I'm very happy about it. I have some questions about performance of Unity and if (and hopefully how) NGUI can be used to improve the performance. There's no problem with the performance of the NGUI level script execution.
We're making an application that has to display high-resolution pages on tablets (1536x2048, ipad native). Since we'd like it to be running on low-memory systems too (and also have non-texture assets like sounds), we're loading and unloading these pages from prefabs. I started out using Resources.Load, and unsurprising got a performance drop on the occasions where I load new pages.
I updated unity to 4.5.4 and got to play around with Resources.LoadAsync and co-routines, which severely reduced the spikes on page load. There's still the occasional spike though so I fired up the profiler to see what creates it. Turns out it was the Loading.ReadObject when called from Material.GetTexture(). Again, not surprising since we're running on low-performance systems and the textures are fairly high resolution.
I was thinking that since it's NGUIs atlas maker that I used to make the materials that are loading, you experienced NGUI people might have some clever tricks up your sleeves ...
Anyhow, question:
1) Is there anything optimization-wise I can do about the materials that NGUI's atlas maker creates?
2) Will Material.GetTexture() be slower if the texture is part of a larger atlas? In that case, maybe splitting the textures into more atlases would mean smaller lag spikes more frequently, which would be less noticeable.
3) I'm assuming that cutting my texture size in half would improve on this (and make our graphics artist cry). Am I correct in assuming this? (The performance part, not the artist part).
4) Anything else about my approach that's stupid?