Batching of UI elements or sprites

Are there ways of batching UI elements? Or is this automatic?

I found some references to element and sprite arrays in the BatchManager (batchGroup) source - but there is nothing else to be found.

Is this for future updates? Is batching automatic for UI elements?


Currently batching is disabled on elements and sprites as it was not working. We’re working on fixing/integrating it properly in the future.

What does batching UI elements mean?

@dave Thanks for the info!
Is there any change you could share what was not working? Is there a quick hack to at least make the elements work (under certain conditions). I need all the performance I can get - and I am willing to do workarounds.

Thanks again!

Batching didn’t support sorted/transparent elements so there was no guarantee that your rendering order would be preserved. I think that is working now, but we haven’t fully tested the feature.

You can set the batchGroupId on element components and it may work for your needs, but just be aware that there may be bugs or the behavior may change in the future.

Ah - that might indeed be helpful.
I will check it out and report any findings here

Any update on this? Is batchGroupId working now?
According to the profiler, the UI is responsible for 50% of the drawcalls in our game :face_with_raised_eyebrow: