Camera Render to texture not showing alpha in build, but does in editor playmode

I have a UI canvas that contains a child object with a transparent sprite and below that I have a mask texture using a white circle texture in the shape of the transparent crosshair sprite above it, and finally below the mask is a raw image that uses a render texture. This render texture is rendered to by a second camera i have in my scene set to only view objects on the “minimap” layer. I have other gameobjects in the scene with round colored textures that are set to the “minimap” layer.

In the editor when I play, it works just as it should, the red icons for the enemies in the scene show up within the crosshair in the corner and you can see through it to see the background behind it. However, when I build and run the build, it instead renders what was completely transparent previously as completely black now.

I’ve tried fiddling with a few different settings and I can’t figure out what’s causing it to behave differently in the build than it does in the editor. Any ideas?



If you can’t get it transparent, you need to trick it. Just a stupid kick of a suggestion but can you make the material a multiply.

Same problem on iOS with LWRP. However it works on iPhone X when render texture format is ARGB64 but doesn’t work at all on other devices.

Depending on your build platform. I will give you some tips and checklist that may help you identify the problem and solve it.

Checklist :

  1. Make sure the asset is actually loaded in the build along with right transperancy shader.
  2. Check Texture compression for your platform. Android, IOs and Desktop have different texture compression
  3. Debug the build by printing out the name of the material and the shader it has so you know for a fact that this image has the shader and the material in the run time.
  4. Worst case, make an empty scene with just this item and see how it renders.
  5. Advanced: Run profiler from standalone build and check on Unity editor if the assets have been loaded