I’ve been having issues keeping my draw calls low using UGui. After taking appropriate measures to pack my sprites, I’ve learned that UGui does not handle overlapping sprites very well. Building my UI, which consists of many smaller panels, is generating around 20 draw calls for one screen. Are these draw calls from UGui harmful to the games performance on mobile devices? Are there any other techniques or methods I could implement?
A drawcall is a drawcall. Every drawcall will increase the time needed to render one frame of your game. Each seperate texture that is used in your game (visible by the camera) will result in a drawcall.
The first thing that comes to mind is reducing the number of stacked UI elements, but i assume you have a reason why you setup the UI like you have. So thats not really an applicable solution.
The next thing you can do is to pack the sprites using the SpritePacker. I’m not sure if that will work for you, but it could reduce the amount of drawcalls dramatically. Since you linked the thread where this was stated, i guess thats also not a solution for you…
So the last resort solution, which i use, is to reduce the number of stacked UI elements, by faking it with textures. What i mean is that my panel looks like it is inside another panel, but in reality it’s just the texture that makes it look like this. This is of course not a solution if you need them to be seperate objects, but it works for me most of the time.
I’m afraid there is no boilerplate answer i can provide to solve your problem…