Organizing your UI for Performance in Unity

Objective: Static vs Dynamic UI

There are some ways to optimize how the UI performs in Unity the first of which is to use multiple canvases. These should be split at minimum between static and dynamic. This is because Unity redraws the entire canvas when instead of just the canvas element that gets updated.

All non moving elements such as frames, images and text can be seperated from text, images and buttons that change or are interactive. You could go further and spilt interactive elements into more seperated canvas such as player health, gems/coins then have all button elements on another canvas and so on.

Another thing to look at is raycasts and images. Unity uses Raycasts on every image in a canvas therefore the best option is for all non interactive images is to turn the Raycast target off if not needed.

One that might surprise you is enabling and disabling canvas game objects. It is actually much more performant to enable and disable the canvas component of the object rather than the object.

For more on UI optimization and details on how to perform these tips, there is a very nice article in Unitys pages which can be found here.





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

Recommended from Medium

I love working out, and spend a few hours a week running, biking, swimming, and completing…

The Default APY for Our Staking Portal will Decrease from 30% to 18%

Fastly-Tempo 🚀: A Real-Time Data Pipeline for Fastly’s CDN

How to join Avalanche-Everest Release

Top 5 Javascript Test Automation Frameworks in 2022

Where did you grow up?

X World Games Development Updates: #1

How To Edit wp-config.php on Elementor Cloud Website

How To Edit wp-config.php on Elementor Cloud Website

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
Simon Leen

Simon Leen


More from Medium

2D Mobile: Setting Up The Player

Initializing A Git Repository in Unity

Magnetism in Unity Made Easy!

Unity Basics by making a project