Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change color text of Text Meshpro Inputfield

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)

like image 652
ledien Avatar asked Sep 15 '25 06:09

ledien


1 Answers


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

Look At Here

like image 105
MohammadReza Arashiyan Avatar answered Sep 18 '25 09:09

MohammadReza Arashiyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!