Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

How to check for pressed keys in WebGL?

$
0
0
Hi there, In my project i check if a configured key is pressed during update as follows: void Update() { if(Input.GetButton("Player 1 left")) { ExecuteAction(); } } When i "Build and Run" for WebGL and test the controls in Chrome (43.0.2357.134), the keypress is not recognized. For my button configurations i use the "asdw" keys - this configuration works fine in the editor. I already tried to set the focus on the canvas as follows, but still nothing fires: http://gamejolt.com/community/forums/topics/unity5-webgl-game-doest-take-keyboard-focus/9253 http://forum.unity3d.com/threads/urgent-webgl-keyboards-event-not-working-when-in-a-iframe.299215/ Is this a known problem? Thanks - Michael

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>