0
\$\begingroup\$

I have this simple code:

void Update()
{
    if (Input.GetKeyDown(KeyCode.Escape))
    {
        Debug.Log("Escape");
    }
}

When I test it...

  • In the Editor, I press Escape, and it works.

  • On my Android, I press the Back button, and it works.

But when I hit play in the Editor while Unity Remote is running on my phone, neither the Escape on my keyboard, nor the Back button on my phone works.

The Update method is constantly running, just the Input.GetKeyDown returns false.

Why?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.