Unity3D 5.0的项目导出到安卓项目,在UnityPlayerActivity.java里面的onKeyDown和一些按键按下的事件无法监听到摇杆的轴键按下,就是x, y, z, rz轴的数据(实际摇杆),修改AndroidManifest.xml文件中的meta-data可以解决,
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
参考:http://forum.unity3d.com/threads/cant-get-onkeydown-event-in-mainactivity-with-unity-4-3-1-exported.218437/
http://forum.unity3d.com/threads/cant-get-onkeydown-event-in-mainactivity-with-unity-4-3-1-exported.218437/
http://www.it165.net/pro/html/201308/6925.html
时间: 2024-12-16 07:20:44