Create a gist now

Instantly share code, notes, and snippets.

ArborとuGUIのボタン連携。
using UnityEngine;
using System.Collections;
using Arbor;
public class UIButtonTransition : StateBehaviour {
[SerializeField]
private StateLink _NextState;
[SerializeField]
UnityEngine.UI.Button button;
// Use this for enter state
public override void OnStateBegin()
{
button.onClick.AddListener(OnClick);
}
// Use this for exit state
public override void OnStateEnd()
{
button.onClick.RemoveListener(OnClick);
}
public void OnClick()
{
Transition(_NextState);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment