Organizing your UI for better performance in Unity

--

Unity suggests to have static Canvas and active (dynamic) Canvas

It is due to canvas dirty, it is, when you update the canvas, Unity needs to re draw each UI element
If you separate them, you can have static images and text to avoid re drawing them

Also it is very important to check Raycast only if the image will be a target

For deactivating Canvas, it is better to disable the Canvas component instead of disabling the entire gameobject, it seems to be more efficient

As said before, try to avoid reference types (classes) as much as possible, for instance, String and Arrays

Further information can be found here

--

--

No responses yet