Normal Color.
#pragma strict // Required when Using UI elements. public var button: Button; public var newColor: Color; function Start() { //Changes the button's Normal color to the new color. var cb: ColorBlock = button.colors; cb.normalColor = newColor; button.colors = cb; }
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour { public Button button; public Color newColor;
void Start() { //Changes the button's Normal color to the new color. ColorBlock cb = button.colors; cb.normalColor = newColor; button.colors = cb; } }