i am android programmer and i want control button input in android for example i made a game that when you press back button in android mobile nothing happens but i want quite from game.
This is how you can use the android back button in Unity games.
In C#
void Update()
{
if (Application.platform == RuntimePlatform.Android)
{
if (Input.GetKeyDown(KeyCode.Escape))
Application.Quit();
}
}
or in JS
function Update()
{
if (Application.platform == RuntimePlatform.Android)
{
if (Input.GetKeyDown(KeyCode.Escape))
Application.Quit();
}
}
but how i can contorl other buttons