Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question World Space UI Canvas rendering every element on separate quad?

Discussion in 'UGUI & TextMesh Pro' started by Dexer75, Feb 22, 2022.

  1. Dexer75

    Dexer75

    Joined:
    Oct 2, 2013
    Posts:
    3
    Hi all. I could not find any information on this topic on the Internet or on this forum.
    Until today, I thought that UI Canvas is a component that allows to optimize UI elements output on the screen, allowing to bake, prerender all child elements and canvases and combine them into one texture, which is then overlaid on one quad and rendered in one pass as a texture. That's what I thought until I had the task of creating radial menus for the planets in my project.

    I thought the situation was exactly the same with world space canvas. That it's a component that allows you to connect all the child elements, essentially assemble them into one texture, which is then overlaid on one quad and rendered in 3d space. What was my surprise to find that if the child elements are at different z-positions, they are rendered as separate elements located in 3D space and each of them can individually intersect the 3d objects.

    A good practice for screen space canvases is to combine many canvases into one for optimization purposes. What about if there are 100 of them and they are all on the same plane and have a common world space canvas as a parent? Will it be optimized in any way? And if they are all located at different z-depth, what will happen to them?

    I feel like I don't understand how the world space canvas is rendered at all.
     

    Attached Files:

  2. Dexer75

    Dexer75

    Joined:
    Oct 2, 2013
    Posts:
    3
    None of you know how it works?