- Home /
Question by
jeffreyliu · Sep 21, 2016 at 06:32 PM ·
keycodekey pressed
Key event does not work
I am using Unity 5.2.2f1 to develop an Oculus app, and now I have a problem about key event. When I press a key or pass a key event (e.g. adb shell input keyevent 96), in normal case, the focused button in the screen will be pressed down, but sometime, it does not work (nothing happened to the focused button). I have added some log in the dispatchKeyEvent function of UnityPlayerNativeActivity, but the logs was not printed in the console. And I also noticed that the key event was handled by com.unity3d.player.UnityPlayer, so I want to know how the UnityPlayer handle the Key Event? And What may be the cause of my problem?
Thanks in advance.
Jeffrey
Comment