- Home /
UI Canvas performance
Hi everyone,
I have a simple 2D, incremental game.
Right now the game has all of it's UI under one canvas with panels and subpanels acting as hierarchy. All of the UI elements are active at the same time (mostly because it's scrollable).
Unfortunately, I'm seeing FPS goes under 15 on my android device (Samsung Galaxy Camera GC100).
The profiler shows huge spikes coming from EventsSystem.Update().
What are the my best possible options in this case?
Thanks in advance!
All I can say is I've definitely noticed the same thing. However my spikes tend to be on the Canvas' rendering. I have seen the console emit a warning about On$$anonymous$$ouse_ events being inefficient. Since you said it's on EventSystem, that might be one place to try, but only if you actually have scripts with On$$anonymous$$ouse_ events
Thank callen. Actually I don't use On$$anonymous$$ouse events in my scripts at all and I don't receive any Unity Warnings.
Even the scripts that are triggered by buttons are pretty limited...so I don't believe that's where my issue is.
I'm wondering if using multiple canvases would be more efficient than using only one?
Answer by Eugenius · Apr 27, 2016 at 03:31 PM
Sorry for the late reply here - the issue was actually because of all the objects that were visible at the same time (lots of which were not visible).
I fixed the issue by hiding everything that shouldn't be visible by using canvas groups on all of the objects.
Answer by eses · Apr 18, 2016 at 08:06 PM
Hi,
if by scrollable you mean that you have used ScrollRect, then that might be the issue. I've noticed myself that it can be really slow on weaker devices. There has been discussions about this on Unity forums, in UI area threads like this:
http://forum.unity3d.com/threads/scroll-rect-is-tooo-slow.396366/#post-2600808
Thanks a lot!
This may actually help a lot! I'm not sure if I can get rid of the scroll rects but I do have a high number of UI Texts with Outline/Shadow on them so that may be it :)! I'll come back with results tomorrow!