Unusually extreme lag in editor (Android platform). Very simple scene
Soooo I have a weird issue...
When I switch to Android Platform I suddenly get extreme lag (less then 10 FPS), even though the scene just consists of simple UI elements. The weird thing is, when I select something in the Hierarchy the lag completely disappears. I can scroll through my list at 150 FPS. As soon as I hit a button or interaction the lag comes back, making it almost impossible to interact with.
UI View Hierarchy Profiler
Configuration: The UI View is very simple. I have a static Top Panel, a Drawer with some buttons and a search button. The main part is a 'Scroll Rect' where 'ProjectWidgets' are instantiated into a 'Vertical Layout Group' with a 'Content Size Fitter'. The 'ProjectWidget' is made up of a masked Image and some text.
Back-end: The data and Images are downloaded from a Firebase server.
Build platform: I had my build platform on standalone at first and never encountered any lag. I also have no problems on iOS. The problem is only on Android.
Thoughts: At first I thought it had something to do with the Textures, but the same thing happens when I don't use images. That's why I also think that this is not an optimalisation issue, but something else. The Profiler indicates it is a problem with the GPU at Canvas.RenderOverlays.
Does anyone have any idea what this might be?
Extra Info: I'm using Unity 2019.4.0 Pro (trial). GPU is GTX 1060.
Of course other stuff is happening in the scene, but would be too much to add here. If you need more information please let me know.
Answer by RobinopdeBeek · Jul 01, 2020 at 08:24 AM
Just wanted to let you know I found the problem. The culprit was a downloaded UIEffect that auto generated shadows for UI elements. Seems like I should have just made my own shadows from the beginning.