Canvas as component vs Canvas as child

ScreenShot. Which works better? Why?

  1. Attach Canvas to gameObject as a component and then add Text as a child.

  2. Add both Canvas and Text as children.

  3. UPDATE: Both Canvas and Text as Components

  4. All work equally well.

Also is it a problem if I have many gameObjects like in this case I’ve got 50 and they might become even more in the course of time with each one having its own Canvas?

By having each GO have its own separate canvas component (or child), you will prevent batching of draw calls (which is done at the canvas level), which is not ideal for performance.

To get the best performance, you would have a single canvas component higher in the hierarchy than all the other UI components. You could also have nested (sub) canvases in order to group renderables for performance (such as one for all static UI elements) and one for elements changing every frame.