- Home /
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?
Answer by Vilhien · May 22, 2019 at 02:13 AM
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.
Answer by Bruno-Gregoire · May 22, 2019 at 04:46 PM
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.
Answer by Shrikky23 · May 22, 2019 at 08:09 PM
Depending on your build platform. I will give you some tips and checklist that may help you identify the problem and solve it.
Checklist :
Make sure the asset is actually loaded in the build along with right transperancy shader.
Check Texture compression for your platform. Android, IOs and Desktop have different texture compression
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.
Worst case, make an empty scene with just this item and see how it renders.
Advanced: Run profiler from standalone build and check on Unity editor if the assets have been loaded
Your answer
![](https://koobas.hobune.stream/wayback/20220612201835im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Render Texture strange noise error 1 Answer
Rendering UI to render texture - UI scaling issues 0 Answers
Rendering at a smaller resolution? 1 Answer
How to Make a Window? 2 Answers
Can't display transparency via Render Texture on Raw Image 0 Answers