var text : string
Description
The text that is displayed.
See Also: text mesh component.
GetComponent(TextMesh).text =
"Hello World";
using UnityEngine;
using System.Collections;
public class example :
MonoBehaviour {
void Awake() {
GetComponent<TextMesh>().text =
"Hello World";
}
}
import UnityEngine
import System.Collections
class example(
MonoBehaviour):
def
Awake():
GetComponent[of TextMesh]().text = 'Hello World'