How use ANDROID NAVIGATION BUTTONS
Hello everybody. I'm trying to figure out when the user clicks the navigation buttons on Android devices (Unity 5.2). But I have nothing. PLEASE HELP ME TO UNDERSTAND WHY unit can not do that. What should I do, that we could finally clicked DETERMINE THE "Menu | Home | Back." All I Found in the vast almighty Google is:
if (Input.GetKeyDown (KeyCode.Escape))
{
// TODO....
}
or
if (Input.GetKey("escape"))
{
Application.Quit();
}
or
public void Update ()
{
if (Application.platform == RuntimePlatform.Android)
{
if (Input.GetKeyUp(KeyCode.Escape))
{
//quit application on return button
Application.Quit();
return;
}
}
}
or something similar... This is non-working code! What you need to do to earn !? PLEASE HELP ME!
Not looked into t myself, but I imagine you will not have access to the event of the player hitting the home button (at least nothing usable) since apps should not be able to change what this button does, it is a System button that will suspend any active application.
The $$anonymous$$enu button on the other hand might be accessible, good luck in your attempts to grab that event.
Input.Get$$anonymous$$eyDown("Cancel") should work
btw: youd should use http://docs.unity3d.com/$$anonymous$$anual/PlatformDependentCompilation.html especially in the update function ;)
Input $$anonymous$$ey named: Cancel is unknown