A huge performance issue on android with CanvasGroups

Hello,
I have a lot of windows implemented using uGUI with CanvasGroup attached to every window root game object.

On every given time, a single window is shown, it means that every other CanvasGroup alpha is set to 0.
I tested the app on my android device (LG G3) and im getting less than 10 FPS.
The funny thing is that on IPhone i get 60 FPS…

I tried deactivating the game objects that arnt shown and seeing if that helps and i get 60 FPS on android again.
I thought that when CanvasGroup.alpha is 0, unity will stop rendering the UI elements…
I think that this is a bug because it happens only for Android and not IPhone, i tested it on other android devices and got the same results.

Am I doing something wrong? or should i fill a bug report?

so, when you disabled the UI elements, did the FPS get back to its normal?

Exactly

CanvasGroup.alpha=0 still produces draw calls… So no way to do it. I wrote a scripth that disables canvas when it is out of frustum. You should also do it. I wonder @Tim-C 's solutions here. What you think? When CanvasGroup.alpha=0 it still produces drawcall. Is it a bug?

Is there a way to disablebthe rendering of that canvas group? I dont want to disable the gameobject because it causes problems with coroutines…

But still, after all its a hack, there is no reason fo it to work that way

What I am thinking is that there is a new component called 2d mask which uses new cull api in 5.2. Maybe you can attach it to your parent canvas. Than, whenever your windows are outside of this canvas, they are culled(not rendered). But they should be outside of this mask.

Are you sure it works that way? And im waiting for someone from unity to reply to know for sure if its a bug… Because why on iphone im getting good performance and not on android?

Anyone? Its very important because the company i worked for wants to publish the game…
Sent a bug report: 729093

1 Like

I have managed to get fix this issue by adding a canvas component into every gameobject with a canvasgroup attached to it…

And setting the canvas to enabled / disabled when the CanvasGroup alpha is 0 or 1.
Its a hack, and i dont think it should be done that way…

1 Like