Hello,
I would like to get text without the markup. I’ve been looking through Text component and string methods, but I don’t seem to see anything. Is there a helper method for that, or will I have to parse it myself? Thank you
Hello,
I would like to get text without the markup. I’ve been looking through Text component and string methods, but I don’t seem to see anything. Is there a helper method for that, or will I have to parse it myself? Thank you
Oh well I did it manually, if anyone knows of a Unity way I’ll mark it as correct answer
string cleanText(string text)
{
bool loop = false;
string ret = "";
foreach (char x in text) {
if (x == '<') {
loop = true;
continue;
} else if (x == '>') {
loop = false;
continue;
} else if (loop) {
continue;
}
ret += x;
}
return ret;
}