Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

Selectable.colors

public UI.ColorBlock colors;

Description

The ColorBlock for this selectable object.

Modifications will not be visible if transition is not 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; } }
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答