Skip to content

Instantly share code, notes, and snippets.

@ochilab
Last active October 21, 2016 04:16
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 ochilab/c10fe1815dc43288f27848a625b4f048 to your computer and use it in GitHub Desktop.
Save ochilab/c10fe1815dc43288f27848a625b4f048 to your computer and use it in GitHub Desktop.
はじめてのUnity2Dボタンクリックサンプル
using UnityEngine;
using System.Collections;
using UnityEngine; using UnityEngine.UI;
public class NewBehaviourScript : MonoBehaviour {
public Text TestText;
//ボタンクリック時のメソッド
public void ClickTest() {
TestText.text = "ボタンが押された";
Debug.Log("Clicked.");
}
Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment