This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
namespace KDLib | |
{ | |
/// <summary> | |
/// 2つの色を切り替える | |
/// </summary> | |
public class SwitchColor : SwitchValue<Color> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SerializeField] private SwitchColor _switchColor; | |
void Start() | |
{ | |
// 現在の状態と違う色に切り替え | |
_switchColor.Switch(); | |
// trueの方に設定された色に切り替え | |
_switchColor.Switch(true); | |
} |