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.

var color: Color;
Color color;
color as Color

Description

The color of the GUI texture.

	// change the color of the texture to green
	guiTexture.color = Color.green;
using UnityEngine;
using System.Collections;

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

public class ExampleClass(MonoBehaviour):

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