Skip to content

Instantly share code, notes, and snippets.

@Nunocky
Created November 14, 2014 00:41
Show Gist options
  • Save Nunocky/2d5ea49b37ce312b43e5 to your computer and use it in GitHub Desktop.
Save Nunocky/2d5ea49b37ce312b43e5 to your computer and use it in GitHub Desktop.
Android + Unity Backボタンでアプリケーションを終了
function Update () {
if (Application.platform == RuntimePlatform.Android)
{
if (Input.GetKey(KeyCode.Home) || Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Menu))
{
Application.Quit();
return;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment