- Home /
Canvas UI Draw Calls
Hey.
So I'm at a point where optimizing is a large part of what I am working on now. The project I am working on started before the 4.6 Update, and when 4.6 came around we converted all of the UI to the new 4.6 UI system. This has been working well, or so it seemed, until it came time to look at optimizations and stuff.
I am using XCode and the Capture GPU Frame function to check the number of draw calls in the scene at that point in time. This has been really useful for finding what is and isn't being batched currently, and what I need to alter the settings for in Unity.
Because of that, I discovered the Sprite Packer (totally had no idea it existed, but I do now!). I have all of my UI elements tagged as "UI", leading to 5 2048x2048 sprite packer atlas' (atlasses, atlassi?) however a single panel (admittedly a rather heavy UI panel) is still leading to 25! additional draw calls. It's kind of ridiculous!
So I have some questions:
I assume the different atlas pages will not batch with each other? Is that a correct assumption?
If I have nested objects within a canvas, will only siblings be able to be batched? Or should they batch with any object that is a part of that canvas?
Do you guys have any general Canvas UI optimization tips. (I have read through the general optimization tips for mobile that Unity have, along with countless other posts. I was just wondering if there were any that you recently discovered that could be of any use)