Search Unity

Worldspace canvas on a stacked camera layer not working (unity bug?)

Discussion in 'UGUI & TextMesh Pro' started by nosebleed_dre, Dec 3, 2020.

  1. nosebleed_dre

    nosebleed_dre

    Joined:
    Jul 25, 2013
    Posts:
    23
    Hey,

    We have a rather complex system, which I'll explain first. Using URP. We have a "PlayerCamera (Head)" which is the main gameplay camera attached to a first person controller. This renders the main view of the world as you move around in first person. This renders defualt layer and a few others.

    We have a bunch of playable arcade games which are rendered to texture using various sub cameras (usually rendering a layer called "ArcadeGame").

    All good so far.

    One of these games is a little more complex. It has a "Main Camera" which renders the "ArcadeGame" layer. There is also a sub camera "Main Camera (2)" that is set to Render Type "Overlay". It only renders a layer called "SpaceAsteroidsPlayer" (ignore the terrible naming) and it is rendering as a stack component of the "Main Camera". The reason for this is that the "Main Camera" is Ortho for the UI/Gameplay but we added a sort of JRPG style world map that needs a perspective camera.

    All this is working really nicely... However...

    I needed to add some 3D worldspace UI for some text boxes (need to be UI rather than sprites) and even though they're on the correct layer and can be seen in the correct position in sceneview, they don't render in the game view.

    I'm pretty convinced it's a Unity bug to do with camera stacking and worldspace UI, since it displays correctly if I set the render type of "Main Camera (2)" to "Base" and give it the render texture as it's output. Bizzarely if I do that, and then switch back in play mode, it works as intended whilst in play mode (but obviously reverts once you stop).

    Am I missing something or should I file a report?
     
    yano_123 likes this.
  2. Foxy157157

    Foxy157157

    Joined:
    Jan 29, 2021
    Posts:
    1
    Having literally the same problem, while all settings are set up correctly
     
  3. EvanZSV

    EvanZSV

    Joined:
    Jan 15, 2016
    Posts:
    5
    Same issue...