I have been trying to use TMP_Text.GetParsedText(), but the string I get exists out of empty characters (while the length of the string is correct).
So by example when I have the text “<#ffffff>Test” the resulting string will just be “” and has a length of 4.
Am I doing something wrong or is this a bug?
The version of Unity I use is: 5.5.0.f3 and TextMesh Pro is version: 1.0.55.0b8.
Edit: I just found out that you have to wait a frame or use ForceMeshUpdate() to make the text work. So consider this problem solved.
Since the text is processed / generated just before the frame is rendered (when a change has occurred), the resulting change won’t be reflected or the textInfo data structure updated until this has happened. Most of the time this is fine but for those times when you need to text to be processed right away, you can use the ForceMeshUpdate() function as you have stated in your edit
When working with the input field, you should not be accessing the text of the child text component. This component is used to display the text. Instead you should be accessing the parent input field .text property.
As for the reason, imaging an input field set for password. The text of the child component would be “*****” whereas the text of the parent input field would contain the actual password.