Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Arborを用いたボタンの活性/非活性
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Arbor {
/**
* ボタンを活性/非活性にします
*/
[AddComponentMenu("")]
[AddBehaviourMenu("UI/Button/ボタンの活性、非活性")]
[BuiltInBehaviour]
public class ArborButtonInteractable : StateBehaviour {
[SerializeField] private UnityEngine.UI.Button _Button;
[SerializeField] private bool _Interactable;
public override void OnStateBegin() {
if (_Button) {
_Button.interactable = _Interactable;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.