- Home /
Question by
Ambrose998800 · Dec 24, 2016 at 12:19 PM ·
textrendertexture
Strange UI behavior
Oddly, if I check the scene reference of a render texture, it shows UI elements that have nothing to do with it. Further, as soon I used the render texture in a script to assign it to a material, all UI Text elements turned to black, without any changes to the text element.
That's the code I used:
[Header("Add influence window metarial")]
public Material InflMat;
[Header("Add the render texture")]
public RenderTexture InflRendTex;
void Awake()
{
//Assign render texture to material
InflMat.mainTexture = InflRendTex;
}
How to correct that bug?
Comment
Generally, UI text black color issue is due to: Canvas is not re-paint. It only occurs in the editor only.
Source of the answer: https://www.youtube.com/watch?v=XwD6bX2Z$$anonymous$$$$anonymous$$o&t=5122s
Your answer
![](https://koobas.hobune.stream/wayback/20220612103352im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Render text/font string to Texture2D 0 Answers
How to render text or a texture in a shadow 0 Answers
3D Text Size Relative To Screen? 4 Answers
Black lines,Bug de lineas negras 0 Answers