-
-
Save Norlself/5a424d9b4aa86260ec79 to your computer and use it in GitHub Desktop.
Unity1 ExitEvent.cs
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; | |
using System.Collections; | |
public class ExitEvent : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
Button btn = this.GetComponent<Button>(); | |
btn.onClick.AddListener (() => { | |
Debug.Log ("Quit Application"); | |
Application.Quit (); | |
}); | |
} | |
// 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