Make a Canvas for each level or make a single canvas for all levels?

Hi.

I am confused in making UI for my game.

Do i make a canvas in every level or make a single canvas and make it dontdestroyonload?

While the UI is same on levels, why don’t make a single UI canvas and make it dontdestroyonload?

Also the single UI canvas make it easy to change ui objects.

But unity example projects such as Tanks!!! Reference Project using canvas per level.

Any help is appreciated.

Thanks.

It’s a good idea to keep a balance between number of canvases and number of objects! When you change something inside a specific canvas it will get completely rebuild! (each gameobject).
You can check out the asset called Woo Panels. It solves the problem of panel switching and navigation between menus! Will save you tons of time when creating UI. Also you can learn something from it. Here is the forum thread.

Thanks for sharing answer.

My question was Which one is better create a canvas by each level or create a single canvas at start scene and make it dontdestroyonload?

the Woo Panels does the Panel Management and i don’t have problem about that, my problem is how to manage canvases.

If you have a lot of different graphics for different scenes it does not make a lot of scene to have all the sprites loaded in all scenes.
If you can reuse a lot of pats of the canvas then it makes sense.

I have same graphics for all canvases in all levels, but it is different from the main menu, shop and some other.