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

var alignment : TextAnchor

Description

Text alignment.

JavaScripts
// Prints how text alignment is set at customStyles[0]

function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
Debug.Log(GUI.skin.customStyles[0].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);

}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
if GUI.skin.customStyles.Length > 0:
Debug.Log(GUI.skin.customStyles[0].alignment)