var text : string
Description描述
The text that is displayed.
用于显示的文本。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
GetComponent<TextMesh>().text = "Hello World";
}
}
// Set the text of the attached Text mesh
//设置附加到文本网格上的文本
GetComponent(TextMesh).text = "Hello World";