[Unity 5.2.3p2 seems to fix the problem, thanks Unity !]
Hi again, I’m continue to port my project in Unity 5.2
I notice a terrible game freeze when open my UIs, due to “Font.CacheFontForText”, which taking 3273ms (!), vs nothing in Unity 5.1.3. My UI doesn’t contain a ton of text so… What’s going on ? Does something change about using Text on UI in term of best pratices ?
I’m experiencing what seems to be the same or a similar issue. Spawning my UI can take anywhere from 100ms to 725ms, technically, but Unity Editor hangs for a few seconds during that time (I get an OSX beachball in the more extreme cases) and the profiler doesn’t seem to report the seconds-long hitch. The UI panel I spawned that took 725ms just now doesn’t have any Text components with the Best Fit flag checked. It has two ScrollRect components with 3 buttons each, and those buttons each have two child Text components. It’s hardly a complex UI, but since upgrading to 5.2, Unity can’t handle it.
We’re having the same problem. Huge lag spikes from Font.InvokeTextureRebuilt_Internal() not seen in 5.1. We don’t use “Best Fit” anywhere, and even normalize font sizes to 18, 24, 32, 64 etc. to minimize the font texture size.
I have the same issue, when I SetActive(true) a panel that has Best Fit enabled on just 6 Text components, it takes ~1000ms, whereas a similar panel without Best Fit enabled is instant.
Yep, your first screen is what we face. Can you send a bug report if you can, with project attached ? I couldn’t be able to reproduce it, only on my big project and I don’t want to send 2.5Gb
We are very afraid that when the time will force us to move on 5.2 (because iOS update or anything unsupported in 5.1) the game will be unplayable.
The FontCache is still taking so much time, and my popups freeze at least 3 or 4 seconds on phone on 5.2, when it’s instant in 5.1.
I’m terribly disappointed that after 6 or 7 patches, the problem is still here, and it’s huge. I think I will upload to you our 3Gb project, it’s my last solution.
We sent the whole studio project, issue bug #735927 on fogBuzz. I may be forget to mention it in the bug but you’ll need to play a bit (at least the tutorial) to open some menus, and you may need to build on Android to see the freeze.
And you can use our project to test everything you want, I think this is important for you to test your bugs on a big project and well, we share ours to you, you can do every test you want, even not related to my case.
Hope you’ll find this post and our project, if you see that the cause is a bad practices, feel free to contact me or post in this thread. Thanks !