Camera targeting RenderTexture not calling RenderLoop.Draw on Build.

Hello, I’m running into a bug where I have one camera rendering to a render texture (Will call it Camera A), and I use that texture in a material that is rendered by the main camera (Will call it Camera B). Camera A is rendering a Canvas that changes during gameplay, and I want to apply a shader effect to it, so I render it to a render texture.

Works fine in the editor, but when I build it turns blank, where the texture should be it is just transparent, nothing is rendered. The effect is still applied to a transparent texture.

For debugging purposes, I added a third camera (C) as an overlay to the Main Camera (B) rendering the canvas that Camera A renders. As you can see in the poorly edited image, on the left side there is the content of Camera C being rendered on top of Camera B, in the middle, there is a Quad using a material with the render Textures, and also for debugging, on the right there is a Canvas with a Raw Image with the render texture content.

Works fine in the editor, the third image shows the same setup in the build, on the left, you can still see the canvas being rendered as an overlay in the same position (so I think it’s not culled), on the middle you can still see the quad applying the effect to a transparent texture and on the right, the Raw Image is also completely transparent.

After some debugging, when using the frame debugger, I discovered that the build version is not calling RenderLoop.Draw (see image). The same bug happens without the Overlay camera (C), it’s there just to test if the canvas showing properly. Also attached an image of my scene setup.

Does anyone know what might cause this and how to fix it?

Using Unity 2020.1.7f, with URP and a 2D Renderer. Building for Windows using IL2CPP and .NET 4.X, using DX11 as Graphics API.




Accidentally uploaded the same image twice, here is the one with the scene setup.

I`ve since remade the project from scratch, exact same configurations (At least I think so, checked everything) and it’s now working.