Home > Enterprise >  How can I add a key Listener into unity for all keys?
How can I add a key Listener into unity for all keys?

Time:06-26

I am creating a game in unity and I want to make a title screen that allows you to either click anywhere on the screen(got this working) and be able to press any key on the keyboard(can only get a key listener for 1 key)

CodePudding user response:

    void Update()
    {
        if (Input.anyKeyDown)
        {
            Debug.Log("A key or mouse click has been detected");
        }
    }
  • Related