WebGL Stops all keyboard input for HTML inputs
Hi,
Unity Version: 5.4.2f2
Build Type: WebGL
My webgl Unity application is blocking all keyboard input which is required for other HTML inputs.
I have looked at the similar posts but below line doesn't seem to help:
#if !UNITY_EDITOR && UNITY_WEBGL
WebGLInput.captureAllKeyboardInput = false;
#endif
I have read the below material. Still not working due to either posters using older versions or just generally broken.
Any advice is greatly appreciated.
Alex
http://answers.unity3d.com/questions/1228181/unity-webgl-prevent-from-eating-up-all-mouse-keybo.html
https://forum.unity3d.com/threads/webgl-on-kongregate.318417/
https://forum.unity3d.com/threads/webgl-not-receving-keyboard-input-in-some-browsers.294598/
https://forum.unity3d.com/threads/disable-enable-keyboard-in-runtime-webgl.286557/
http://answers.unity3d.com/questions/993114/webgl-moduledonotcapturekeyboard-true-or-modulekey.html
http://answers.unity3d.com/questions/1032916/webgl-canvaskeyboard-focus.html
http://stackoverflow.com/questions/31040686/catching-input-events-in-webgl-build
Answer by AClose · Dec 20, 2016 at 12:21 PM
I fixed this issue by embedding the WebGL build within an iframe. Seems to be working fine now :)
Your answer
Follow this Question
Related Questions
How do I do a html5 build for a game with entierly C# scripts ? 1 Answer
keyboard input not moving object 1 Answer
Input keys not working ! please help me,Can't use input keys ! please help me ! 0 Answers
render HTML5 canvas in unity for mobile 0 Answers
Game controls as string inputs [c#] 0 Answers