branchrust_reboot/main/ui_overhead_optimscancel
13 Commits over 0 Days - ∞cph!
LoadingScreen toggles its soft mask
DeathScreen toggles its canvas too
Crafting, inventory, contacts, conversation and clan screens toggle their canvas when hidden
Saves an extra ~0.05ms per frame
Set some texts as non static in the server browser
Restore the text caching in UI_Page, but only for non static texts
Fixed soft masks still wasting time masking when their root canvas is toggled
Disable overlay canvas when the menu is not visible
Commented UIExtraCallbacks, not used as UI particles aren't working in builds
Disable the loading spinner gameobject in the home hero modal when its hidden, was causing canvas rebuilds
Removed the menu code caching and unregistering texts from TMP DoRebuild, not needed anymore
Backported m_IsTextObjectScaleStatic field from newer TMP versions, that let us avoid the slow and useless (99% of the time) TMP_DoRebuild checking the scale of every registered texts every frame. Saves ~0.3ms every frame
Default to true, we'll have to manually update all the texts getting their scale updated at runtime, don't think we have a lot of them
Better soft mask canvas caching
SoftMask uses graphic's canvas when possible instead of polling the nearest canvas
Toggle the canvas component of the menu UI when its not visible
Causes a small spike when opening it, but saves us some UI overhead when its not visible
Also causes a 40b alloc every frame because of SoftMask, need to look at it next