Organizing your UI for Performance in Unity

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.




Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Understanding Message Queue — What every Android Developer Needs to Know

Guest Registration Application

Cucumber — Tags | Code Factory

590. N-ary Tree Postorder Traversal

Mastering subscriptions in iOS: What's new from WWDC 2019

Tutorial: a Facebook Bot for beginners

Plans to maintain Maximum profit💰

Apprenticeships After Coding Bootcamp: Should I?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Niraj Karki

Niraj Karki

Unity Developer

More from Medium

Building UI Elements in Unity!

Unity Dev Blog: Ease of Building UI Elements in Unity

Creating a Keystore File within Unity

Adding Emissions