GUIStyle.wordWrap 自动换行

var alignment : TextAnchor

Description描述

Word wrap the text?

文本要自动换行么?

This will cause any text contrained to be wordwrapped to fit within the width of a control.

这将使任何包含的文本自动换行以适应控件的宽度。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnGUI() {
		if (GUI.skin.customStyles.Length > 0)
			GUI.skin.customStyles[0].wordWrap = true;

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