how to make new line in UI.text

var score:UI.Text;
var pointsshow:int;
function Start () {
score=this.gameObject.GetComponent(UI.Text);
pointsshow=pointmanager.points;
score.text="Killed: "+pointsshow+"Asimilated:"+"Your overall score";

}

function Update () {

}

Hi i would like to make text apper in verses how to do it:) thx in advance

1 Like
score.text="Killed: "+pointsshow+"\r\nAsimilated:"+"Your overall score";

\r\n is Windows I think Mac an android might use \n but both should work.

My Javascript foo is bad though. In C# use just use System.Environment.NewLIne.

3 Likes

I Checked but it doest work. or i implemented it wrong

Make sure your text object is big enough

1 Like

works like a charm :smile: