GUIText.anchor Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIText
GUIText.anchor

var anchor : TextAnchor

Description

The anchor of the text.

JavaScripts
guiText.anchor = TextAnchor.MiddleCenter;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
guiText.anchor = TextAnchor.MiddleCenter;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
guiText.anchor = TextAnchor.MiddleCenter