- Home /
Changing color of select section of text
I'm trying to change the color of a specific part of a text prompt to help differentiate the actual button from the overall prompt's text. Right now I have a Label set up at a set position on the screen:
GUI.Label(new Rect(middleX, middleY + 81.40f, labelWidth, labelHeight), "Press [" + KeyCode.E + "] to Activate");
In this case, the part of the prompt with the key code is the part I want to change. However, there doesn't seem to be a way to change the color of a string in C# in a way that would get me the result I'm looking for.
Is there a way for me to change the color of a specific section of the text with the GUIContent?
Your answer
Follow this Question
Related Questions
Gui list and color 0 Answers
Change the color of the string 2 Answers
Getting the text from UIInput 1 Answer
How do you change the size and color of a GUI Label in C#? 4 Answers
Distribute terrain in zones 3 Answers