- Home /
Render texture only works in scene view
I have a render textured material in my equipment UI ties to a camera that looks at the player so you can see what putting armor/weapons on/off look like without having to close the equipment window. It was working fine, and then just stopped working a couple weeks ago. I'm trying to get it to work again now and I don't see what the problem is.
Strangely, it works fine in Scene view, just not in Game. In Game all I see is black. Not the solid clear color, not the null reference pink, but solid black.
Can anyone think of any reason it would do this? Or need more information on something? I'm testing in a very slim scene.
Found a similar issue
http://answers.unity3d.com/questions/844742/render-texture-in-ui.html
Hope this helps
Answer by malkere · May 23, 2016 at 10:09 PM
That did work Sachin_H thank you. I removed the Image componant, added a RawImage componant instead, and put the render texture into the image slot rather than going through a Material and now it is working.
Dunno why it was and then wasn't working, but it's fixed now.
Answer by Ashanex · Aug 10, 2020 at 09:54 PM
Hi, I'm a voice from the future. Just wanted to say one thing:
THANK YOU, YOU ARE THE MAN OF THE DAY. GO TO A BAR AND BUY YOURSELF A NICE COLD DRINK
Seriously though, I've been banging my head against the wall the entire day until I saw your answer. Thank you.
(Although there was one difference with my problem, in the Game window everything worked fine but when I built the project the Render Textures where not present. Until I used RawImage instead of Image).