Hi all, hoping that someone can help me with a problem I face using line breaks. I have a few strings in an array that is called out to fill a Tiertext (UI text). Within the string there is
, however while the line is reflected, the line break does not work properly.
public string[] characterline = {
"Oh no!
What happened?",
"Try something different!",
"Take care.
Stay safe."
};
public void InsertLines()
{
randomIndex = Random.Range(0, characterline.Length);
TierText.text = characterline[randomIndex];
}
Uhm, Unity’s Text component does not support any html. It does allow certain rich text tags, but those are very basic. There is not “break row” tag. However just using a line break should usually work