I’m making a game on Unity 5.3.3 using UGUI. The issue is that somehow it is running at low fps and there’s only UI involved
The screen in the file attached is running at 35-40 fps on a low resources device ( ARCHOS 50d Helium 4G) and 45-50 in a mid resources device ( Nexus 4) although absolutely nothing is moving. We’ve tried disabling the dark background and all the background buttons. But the issue seems to be in the amount of toggles in the panel ( Might be wrong though ). All the scenes run at 40-45 because there’s not that much content in them, but still this is a huge issue. UI should not have this much impact on performance.
The only issue I can come up with is that every panel is inside the same canvas, so it has to recalculate something for all when doing a transition. But still that doesnt explain the 35-40 fps then the screen is basically static.
I’ve tried making a simple scene with just 2 images. Nothing more. And it ran at 55 fps ( not even touching 60 )
I may be wrong, and I frequently am, but I wanted to ask just in case. How is the canvas rendered? Screen Space Camera, or Screen Space Overlay?
I read a couple days ago that Screen Space Camera takes a lot more resources than Overlay, so maybe that can help you. It’s located under the UI object (GameSettingsPanel in your case)
Testing more I discovered that openGL version might be an issue. Using OpenGL2 the nexus 4 runs at 40-60fps and Archos Helium at 35-50, but when using OpenGL3 the nexus4 runs at steady 60fps and the Helium at 25-40. I’ll look more into that and post here if I find anything
To improve our game FPS I find that disabling all animator, change layers to not render out of screen object (in scrollview) can help.
But we need more performance.
What we do is having UI menu (40 menus pages) in 2 canvas (page and popup) in Screen Space Camera because of Particule systems we need in top.
On old device FPS is a bit low.
I try today to have 2 anothers canvas in Screen Overlay mode if we do not need particules. I have not seen better performance.
To improve quick transition I have activate menu hidden (canvas group alpha = 0). But by doing this if we do not inactive all animator (button and …) then FPS decrease a lot. If we do not let menu actif then transition can take 1 or 2 secondes. With 40 menu pages we have a lot of game object.
What is the best technique?
1/ All menu in one canvas
2/ 1 Canvas per Menu
3/ 1 Scene per Menu (making smooth transition seems hard)