GameObject.guiText 界面文本

var guiText : GUIText

Description描述

The GUIText attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的GUI字体(只读)。(如果没有则为空)

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	public GameObject other;

	public void Awake() {

		other.guiText.text = "HelloWorld";

	}

}
var other : GameObject;

other.guiText.text = "HelloWorld";
Page last updated: 2010-12-13