Skip to content

Instantly share code, notes, and snippets.

@n-taku
Created April 19, 2017 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n-taku/38baba7df6bfaf8d0b03c52758d1d5d6 to your computer and use it in GitHub Desktop.
Save n-taku/38baba7df6bfaf8d0b03c52758d1d5d6 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OnClickBtnScript : MonoBehaviour {
public Button btn;
void Start () {
btn.onClick.AddListener (OnClickBtnCallback);
}
void OnClickBtnCallback() {
Debug.Log ("OnClickBtnCallback");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment