tvOS remote controller button, simulator,tvOS remote controller buttons, simulator
I am trying to respond to buttons on appleTV remote, but I also don't have the device now, so I am working with simulator and simulated remote. I can sucessfully handle touches and gestures (I am using LeanTouch library, and it works for ios and tvos without any problems). But I have no success when trying to react to buttons and touchpad-clicks.
I did some searching, so I know that buttons should be mapped to joystick buttons, eg. Pause/Play to button X and joystick button 15. I tried several ways to catch it - Input.GetKeyDown(KeyCode.X), Input.GetKeyDown(KeyCode.JoystickButton15). Also Input.GetButtonDown("Fire1") , with Fire1's positive button mapped to joystick button 15 in Project Settings > Input. Nothing worked.
Possible reason is that when I run Input.GetJoystickNames(), I always get empty array, no matter if simulated remote is shown or hidden.
My question is - is there something special I should do in order to get some response from simulator remote? Is it OK that GetJoystickNames() returns nothing in simulator?
Even stranger is that I am getting keys pressed on keyboard (if I press eg. "H" on keyboard, the app running in simulator gets true from Input.GetKeyDown(KeyCode.H)). But remote clicks send no KeyCode. I even tried to iterate over all keycodes in KeyCode so that I wouldn't miss anything, but without any luck. It caught those keys from keyboard, but nothing from simulated remote.
Is it problem of simulator, or what?