Line Break probelm in Strings housed in Array

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

"Oh no! \nWhat happened?",

TMP DOES support
though (and will apparently for some reason already insert a line-break if you simply type “<br”)

1 Like
public string[] characterline = {
        "Oh no! \nWhat happened?",
        "Try something different!",
        "Take care. \nStay safe."
    };
public void InsertLines()
{
           randomIndex = Random.Range(0, characterline.Length);
            TierText.text = characterline[randomIndex];
}

Hmmm Am i doing something wrong? Because it is not line breaking as intended even with \n