Component.guiText Manual     Reference     Scripting  
Scripting > Runtime Classes > Component
Component.guiText

var guiText : GUIText

Description

The GUIText attached to this GameObject (null if there is none attached).

JavaScript
guiText.text = "Hello World";

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
guiText.text = "Hello World";
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
guiText.text = 'Hello World'