- Home /
GUI Text changes color to green / Possible 4.6.1 bug?
Is this a known bug or I'm doing something wrong?
I create new Text, set color to white. When I launch the game, text goes green and stays green also in Editor. Also when I try to change color to another is green tinted so it's not possible to change color at all.
When I reload projet the situation is repeating.
Someone with the similar issue?
I have the same problem, the color of the new UI text can't be set to no other like shades from black to green, but other other elements of UI are good.
I have the same problem. Looks like a bug in the current version of Unity. Is there a workaround at the moment? Is the bug already known by the unity $$anonymous$$m?
When I set up a clean new project everythink is fine. Is there some global setup at any place, whiche causes the black to green only color problem?
This happens to me as well. Changing fonts has no effect. The text also sometimes changes to yellow at runtime, but usually changes back to green quickly. If I start a brand new project, new scene, new text object then it seems to behave ok, and then the text in my actual project renders correctly until I run it (sometimes it takes a few runs) and then it goes back to green.
Definitely a weird Unity bug. Upgrading to 5.0.1 had no effect.
I've been able to avoid this problem by applying a UI/Unlit/Text material that I created (with default parameters, white color). Then my text renders correctly in the text color I specify.
Answer by Nice2k · Jan 21, 2015 at 02:45 PM
Ok, I was able to find the problem. Hopefully this is also the solution for your problem. In my code I setted the new color wrongly.
I got this strange behaviour when I setted something like:
text.material.color = Color.black;
This ends up I have to reload the complete project (restart of unity) to get rid of the strange black to green problem.
The solution is to set directly the color of the text.
text.color = Color.black;
I've to check that. In my code I'm not using changing color. But maybe in some plugins I use is used that statement...
Yeah, I had the same problem. A script for a FPS text display that I got off the internet was setting the text.material.color ins$$anonymous$$d of text.color. This means the material color is being set, and in my case I had no material (so Unity must use a default material in it's place). So the default material was being changed. The only way to get it back to normal is to restart Unity. I had to make the same fix as above.
Answer by Reder13 · Jan 17, 2015 at 02:15 AM
is this in a GUI Box? if so do you by chance have GUI.color set to Color.green? because that will change the color of the font in the box or any other GUI. if thats the case you might wanna make a GUISkin, in there you can adjust the font color.
Answer by z37 · Jan 21, 2015 at 11:28 PM
Guys, I've fixed it by changing fonts a few times, after that it disappears.
Your answer
Follow this Question
Related Questions
How would I make a tool-tip sized to text? (4.6 GUI) 2 Answers
Big text field GUI. 1 Answer
Displaying varying text 1 Answer