GUIText.material 材质

var material : Material

Description描述

The Material to use for rendering.

用于渲染的材质。

Assing a new material to change how the rendering is handled. Change this material to change the font used for all rendering. If you assign null to material, the built-in basic font is selected.

指定一个新的材质,改变渲染如果处理。改变这个材质来改变所有渲染的字体。如果你赋值null给材质,将选用内置的基本字体。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		guiText.material.color = Color.green;
	}
}
// Change the material to display green text.
//改变文本材质为绿色显示

guiText.material.color = Color.green;

参见:font 变量.

Page last updated: 2011-1-24