Hi,
I’m currently implementing custom tags functionality for TextMeshProUGUI, but I’ve stumbled upon a problem.
I’m using ITextPreProcessor and in the implemented method “PreprocessText(string text)” I look for my custom tags in the text, store them for further use, then return the text without said tags. This works perfect, but the indices generated are not correct.
Let me show you two examples.
Text with built-in tag:
<color=red>Hello</color>
The first element in TMP_CharacterInfo array is the letter “H” with index 11. This is correct!
Text with custom tag:
<shake=10>Hello</shake>
The first element in TMP_CharacterInfo array is the letter “H” but with index 0. I’m expecting 10 here, since the text input still contains the custom tag, only not displaying it to the user.
Am I completely in the wrong here about how it should work or can someone else confirm if this is a bug and if it can be fixed?
Thanks in advance!
/ Kristoffer