GUIStyle.alignment 对齐

var alignment : TextAnchor

Description描述

Text alignment.

文本对齐。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnGUI() {
		if (GUI.skin.customStyles.Length > 0)
			Debug.Log(GUI.skin.customStyles[0].alignment);

	}
}
// Prints how text alignment is set at customStyles[0]
//打印设置在customStyles[0]的文本怎么对齐

function OnGUI() {
	if(GUI.skin.customStyles.Length > 0)
		Debug.Log(GUI.skin.customStyles[0].alignment);
}
Page last updated: 2011-1-20