A game developer and tech lead in a top grossing company posting Unity, programming, and gamedev related stuff that I find interesting
Website: https://gamedev.center
Most used tags are:
#performance
#shader
#interview
Author: @alexmtr
Post #2508
856
How to optimize UIs in Unity: slow performance causes and solutions
A good post to elaborate on general tips regarding UI optimization.
TL;DR:
Layout rebuilds are a major performance bottleneck in Unity UI. Common triggers include transform changes, sprite swaps, text updates, and activating/deactivating GameObjects. To reduce rebuilds:
– Isolate changes with SubCanvases (but don’t overuse them, each adds its own draw call and layout pass, which can hurt batching and performance)
– Toggle visibility using SubCanvas or Canvas Group + pooling
– Use shaders for visual changes without layout impact
– Replace Unity's layout groups with custom ones for better performance in simpler cases.
A grain of salt: for such posts with performance tests, I would like to see a reference to a repo, ideally with automation to run all cases in one click to verify the results yourself on any version of Unity and device, as well as to verify the code under test itself.
What’s more, a table with all results would also be appreciated, since it allows for easier analysis of the findings.
Drop a 🔥 if you agree
https://dev.to/mygames/how-to-optimize-uis-in-unity-slow-performance-causes-and-solutions-3inh
#ui #optimization
A good post to elaborate on general tips regarding UI optimization.
TL;DR:
Layout rebuilds are a major performance bottleneck in Unity UI. Common triggers include transform changes, sprite swaps, text updates, and activating/deactivating GameObjects. To reduce rebuilds:
– Isolate changes with SubCanvases (but don’t overuse them, each adds its own draw call and layout pass, which can hurt batching and performance)
– Toggle visibility using SubCanvas or Canvas Group + pooling
– Use shaders for visual changes without layout impact
– Replace Unity's layout groups with custom ones for better performance in simpler cases.
A grain of salt: for such posts with performance tests, I would like to see a reference to a repo, ideally with automation to run all cases in one click to verify the results yourself on any version of Unity and device, as well as to verify the code under test itself.
What’s more, a table with all results would also be appreciated, since it allows for easier analysis of the findings.
Drop a 🔥 if you agree
https://dev.to/mygames/how-to-optimize-uis-in-unity-slow-performance-causes-and-solutions-3inh
#ui #optimization
- 🔥 10
- 👍 2



