Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP World Space Canvases Not Showing Up in Builds

Discussion in 'Graphics Experimental Previews' started by Cinder, Oct 15, 2018.

  1. Cinder

    Cinder

    Joined:
    Mar 24, 2015
    Posts:
    20
    I'm having an issue with my project where world space canvases don't show up in my builds.

    If I make a new scene and put a world space canvas in it with a simple UI element, it seems to work as intended, but with my actual project's main scene will not have any world space canvases in builds.

    I've tried making a new camera for my scene, disabling my second camera (I use a second camera for objects close to the FPS camera like the players hands etc), and disabling my post processing.

    World space canvases are documented in such a way that they seem to just be expected to work all the time, I can't find anything that might indicate that they have anything special about them compared to screen space UI, which is showing up fine in builds.

    My scene is too complex to keep randomly disabling and enabling things and making builds to see what fixes it, so if anyone has insight into this issues or what I can adjust to maybe fix world space canvases in builds, I'm all ears.
     
  2. Cinder

    Cinder

    Joined:
    Mar 24, 2015
    Posts:
    20
    Additional Information: This seems to be caused by having an active camera that outputs to a render texture. It works fine in editor but once its in a build all world space canvases become invisible.

    The same happens if you have a camera then add a render texture to its output at runtime.

    I'm still looking into it and found some maybe related bugs, but I'd really like a work around. Choosing between using render textures and using world space canvases is a little rediculous.
     
  3. Cinder

    Cinder

    Joined:
    Mar 24, 2015
    Posts:
    20
    Took a while but I found a solution (more of a work around). Apparently this is tied to an issue in the new render pipeline for LWRP and HDRP. This bug here seems to be a symptom of the cause: https://issuetracker.unity3d.com/is...-render-texture-causes-ugui-disappears-on-ios

    I had to update to the 2018.3 beta to get the HDRP 3.3.0 version, which isn't ideal, but now it works. I was close to finding a work around with 2018.2 I think but this just solves my issue so I'll take the less stable version so I can at least keep working on my project.
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'm glad I found this. I've been trying to debug this for the last couple of hours before I finally stumbled upon your post.

    I'll describe my setup, just in case it's similar to yours. In my game, my HUD is on a world-space canvas on single layer called "VisorUI". I have a separate camera just for this layer, which renders to a render texture. That render texture is then viewed by the main camera. That all works, but all other world-space canvases are invisible in my build (though visible in the scene view.)

    Thanks to this post, I tried turning off my VisorUI camera (the only that renders to a render texture), and now all other world-space UI shows up properly in my build.

    So I guess I'll be waiting for 2018.3, unless they backport the fix. Thanks again for posting this and helping me narrow it down.
     
    Cinder likes this.