With Inputfield we easy change color of text by :
Text text = _inputfield.transform.FindChild("Text").GetComponent<Text>();
text.color=Color.Red;
How can i do it with TMP_Inputfield(Inputfield Text Meshpro)
Wrap your text with <color>
tag.
For example:
This text is <color=red>RED</color> and this is <color=#ce490e>Orange</color>
and assign it to text
variable of your textmeshpro
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With