Organizing your UI for performance in Unity

My currently unoptimized galaxy shooter UI.

In a nutshell, Unity recommends you separate your canvases based on whether you will update them or not. The canvas that you don’t update will have purely static elements and be called the static canvas. The canvas you do update will be the active one. The reason it’s done this way is when you modify an element inside a canvas, it’s considered ‘dirtying up the canvas’ and so every element inside of the canvas must be redrawn.

Unity also raycasts every image on the canvas. It’s important that if an image isn’t clickable, you turn off raycast target.

Don’t turn off the canvas object, instead turn off the canvas component. It’s more efficient.

Hope this helps! You can always check Unitys official optimization tips page for more updated information!




cartoonist, game artist, and wanabe gamedev.

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

Recommended from Medium

Being productive in OSCP and beyond

How to setup a nested HTML template in the Go Echo web framework

Feren OS 2022.03 — the newest delayed release

GNU/Linux Distribution Test: Puppy Linux (BionicPup32)

Version Control and You: Setting up Git for Unity

How To Exit Out Of Manual In Terminal Mac

From Traditional Software Outsourcing to Development as a Service (DaaS)…

How to Facilitate Service Blueprinting

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
Esteban Ibarra

Esteban Ibarra

cartoonist, game artist, and wanabe gamedev.

More from Medium

Creating a Manager Classes in Unity

Loading Scenes in Unity

Creating A Scene Template In Unity 2020.2 And Above

Tips to Improve Unity Performance