Operators Text Mesh

Hi guys. I try to experiment using Text Mesh. I would like to ask is it possible to use operators. (addition(+),divide(/)). Like example: 1000+220=1220. So, the results shows on Text Mesh is 1220. If not possible, so I will use calculator to count everything. And it is time consuming. Like example below:

var text3d: TextMesh; 
function OnTriggerEnter () {
text3d.text = "1000"+220;
}

The results that shows on Text Mesh will be “1000”+220 if I create this way. Or:

var text3d: TextMesh; 
function OnTriggerEnter () {
text3d.text = "1000+220";
}

The results will shows on Text Mesh will be ‘1000+220’. Hope you could share with me.
Thanks. :slight_smile:

No, it’s not possible, cause the Text property expects a string (Unity - Scripting API: TextMesh.text).
I guess what you could do is something like this:

int x = 1000 + 200;
text3d.text = x.toString();

Thank you @paulaceccon for the reply.