Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Component.guiTexture

var guiTexture: GUITexture;
GUITexture guiTexture;
guiTexture as GUITexture

Description

The GUITexture attached to this GameObject (Read Only). (null if there is none attached).

	guiTexture.color = Color.blue;
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        guiTexture.color = Color.blue;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Example() as void:
		guiTexture.color = Color.blue