Organizing your UI for Performance in Unity

Niraj Karki
1 min readMar 23, 2022

Unity Profiler Course

There usually is two types of UI in our scene, one that does not change throughout the lifetime of the game while another which changes its values.

Generating these meshes can be expensive. UI elements need to be collected into batches so that they’re drawn in as few draw calls as possible. Because batch generation is expensive, we want to regenerate them only when necessary. The problem is that, when one or more elements change on a Canvas, the whole Canvas has to be re-analyzed to figure out how to optimally draw its elements.

So its a best practice to create two separate canvas or mainly separate the UI that changes and UI which does not. It will allow the unity to regenerate only those elements inside active canvas while static canvas remains unchanged saving CPU usage and improving performance.

--

--