Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

GUIStyleState.textColor

public Color textColor;

Description

The text color used by GUI elements in this state.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { if (GUI.skin.customStyles.Length > 0) GUI.skin.customStyles[0].onActive.textColor = Color.yellow; } }