Custom Render pipeline and Canvas

Hi am playing around with the new custom rendering and I came into some trouble with the Canvas, if I leave it on overlay the custom render I setup simply does not affect it, and if I bind the canvas to my camera it simply does not render it. What am I doing wrong here?

I am using this to test it https://blogs.unity3d.com/pt/2018/01/31/srp-overview/

You need to emit Canvas data in the editor for the scene view:
https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/af0494232767b5ac44ccb8aebf97d7768c8b1234/com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs#L105

Its not that is not appearing in the scene view, its that it does not appear in the game view either. I started a new project with the Lightweight render example, and with that one (if I put the canvas to be rendered by a camera) it works, I am still not sure on the why. I would play around with it some more to see if I can figure it out.

Any information / bug report is helpful here :slight_smile:

Posting in case anyone else still needs to figure this out.

I had the same problem as the OP and it turned out that I didn’t have the “SRPDefaultUnlit” pass to my transparent render draw call and it is used by the default UI shaders. Adding it fixes the issue and the canvas starts rendering properly even when set to Screen Space - Camera. Having the canvas set to Overlay apparently uses an internal pass to render ui so it works.

2 Likes

What if the issue only happens on iOS (it works on Windows and Mac)
When building to iOS, canvas elements are invisible.

Unity 2019.1.0
LWRP 5.7.2