WebGL Keyboard input
Posted: Wed Sep 20, 2023 7:56 pm
Hi. I've now been testing a project using Dialogue System, deployed as WebGL. I have a dialogue with a request for the player name, but we can't type in anything. In other parts of our game we solve this by doing this before needing input:
.. and then this after input is done and received, so that key capture is returned to the web browser:
Before I hack similar code into DS, do you already have inspector settings for this somewhere?
Code: Select all
#if UNITY_WEBGL
UnityEngine.WebGLInput.captureAllKeyboardInput = true;
#endif
Code: Select all
#if UNITY_WEBGL
UnityEngine.WebGLInput.captureAllKeyboardInput = false;
#endif