GUIStyle
- active
- alignment
- border
- CalcHeight
- CalcMinMaxWidth
- CalcScreenSize
- CalcSize
- clipping
- contentOffset
- DrawCursor
- DrawWithTextSelection
- Draw
- fixedHeight
- fixedWidth
- focused
- fontSize
- fontStyle
- font
- GetCursorPixelPosition
- GetCursorStringIndex
- GUIStyle
- hover
- imagePosition
- lineHeight
- margin
- name
- none
- normal
- onActive
- onFocused
- onHover
- onNormal
- operator GUIStyle
- overflow
- padding
- stretchHeight
- stretchWidth
- wordWrap
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;
}
}
最后修改:2011年1月20日 Thursday 22:11