GUIStyle.wordWrap Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIStyle
GUIStyle.wordWrap

var wordWrap : boolean

Description

Word wrap the text?

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

JavaScript
function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].wordWrap = true;
}

using UnityEngine;
using System.Collections;

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

}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
if GUI.skin.customStyles.Length > 0:
GUI.skin.customStyles[0].wordWrap = true