Basically I activate (using SetActive(true)) a UI.Text GameObject when the player touches a book. When this happens the first time I get a huge performance hit visible in the profiler:
Canvas.SendWillRenderCanvases() (46.4%) : Font.CacheFontForText (8.4%)!
Why? Can I avoid this?
I tried making a script that reactivates the UI.Text GameObject, but this will then cause a: CanvasUpdateRegistry.PerformUpdate() (77.0%) -> Graphic.Rebuild() -> Text.UpdateGeometry()! How can the UI be so expensive? This seems horrible. o.o
Check font settings of the text you use on your UI.Text.
Having insanely high ‘Font size’ increases the generated font texture and that might yield to what’s happening to you. Check the character set as well.
I usually go with
Font size : 64
Rendering mode : smooth
Character : ASCII default set
The font size was not the problem. However, I cannot find "Rendering mode: Smooth". Where can I find this?
I tried making a script that reactivates the UI.Text GameObject, but this will then cause a: CanvasUpdateRegistry.PerformUpdate() (77.0%) -> Graphic.Rebuild() -> Text.UpdateGeometry()! How can the UI be so expensive? This seems horrible. o.o
– TruffelsAndOrangesBasically I'm on Windows 7 with a 3.5GHz processor and 970 GTX and I get horrendous FPS drops due to a SINGLE UI.Text! ...
– TruffelsAndOranges