GUISkin.textField 文本字段

var textField : GUIStyle

Description描述

Style used by default for GUI.TextField controls.

用于GUI.TextField控件的默认样式。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public GUIStyle style;
	private string str = "A string...";
	void OnGUI() {
		GUI.skin.textField = style;
		str = GUILayout.TextField(str);
	}
}
// Modifies only the textField style of the current GUISkin
//修改当前GUISkin的textField样式

var style : GUIStyle;
private var str : String = "A string...";

function OnGUI() {
	GUI.skin.textField = style;
	str = GUILayout.TextField(str);
}
Page last updated: 2011-1-25