Version: 2017.3
public UI.ColorBlock colors ;

描述

用于此可选择对象的 ColorBlock

如果过渡不是 ColorTint,修改将不可见。

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class ExampleClass : MonoBehaviour { public Button button;

void Start() { //Resets the colors in the buttons transitions. button.colors = ColorBlock.defaultColorBlock; } }