Highlighted Color.
#pragma strict
// Required when Using UI elements.
public var button;
public var newColor;
function Start() {
//Changes the button's Highlighted color to the new color.
button.colors.highlightedColor = newColor;
}
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 Highlighted color to the new color. button.colors.highlightedColor = newColor; } }