- Home /
RenderTexture turn my model to black, why ?
I am trying to paint any models, it paints and works fine untill i stop playing. My RenderTexture turns pitch black as you can see. I cannot figure out what should i do. I want my RenderTexture go back to white. It gets back to normal after i just save any script. Like add a line and save then it would come back to white. I don't know why it happens.
Answer by unity_oQhhbvnz7Z9uJw · Jul 20, 2020 at 09:54 AM
So i found a solution for me. I noticed that my Basematerial couldn't hold the white texture, it releases after i turn off the game. So on next start it stayed black.
Now all i did is set the base material to white onStart. Works for me. private void Start() { brushColor = Color.red; BrushCursor.GetComponent<SpriteRenderer>().sprite = CursorSprite; BaseMaterial.mainTexture = (Texture)Resources.Load("Default-ParticleSystem"); }
Your answer
Follow this Question
Related Questions
How can I copy an ARGBHalf RenderTexture to a Texture2D on Windows? 0 Answers
ReadPixels returns RGBA(0,0,0,0) 0 Answers
Texture.Apply() Crashes at Resolutions under 1920x1080 1 Answer
Apply transparent texture to plain at runtime 1 Answer
Rendering screen on texture and grabbing part of it 0 Answers