How to Change the Color of Text without using Markup Text?
Hello Comm-Unity, I am using the Unity built-in input field, and I'm trying to make part of the text change color. I can use markup text, but then when the user uses the backspace button, it deletes part of the markup and reveals the markup to the user. That would be best avoided. So my question is: is there a way to change the color of part of the text in an input field without using markup text?
P.S In case anyone is wondering what I mean by markup text: https://docs.unity3d.com/Manual/StyledText.html
You want editable, partially colored text fields? How is it supposed to know what text to color if the player can change the content?
When it comes down to it, you can change the color of the input field as a whole, and you can use markup text.
It sounds to me like you need to solve the problem of figuring out what text to color. Once you do that, then you can start working out how to change the text color as the user it editing the field.
@alexpizzini Thank you for the quick reply, and I'm sorry I forgot to mention the following: The text's color changes when after the user enters text and presses a button. The only problem is when the user goes to edit the text, if they backspace colored text, they will eventually start backspacing the markup text. That is why I need a different way of doing this.