How to allow text to be selectable in surrounding html in a WebGL build?
I don't need my WebGL game to consume mouse (or keyboard) events, but I do want the user to be able to use both mouse and keyboard in the html that contains my game.
I have tried:
#if !UNITY_EDITOR && UNITY_WEBGL
WebGLInput.captureAllKeyboardInput = false;
#endif
The Manual provides no clues about turning-off consumption of mouse events: http://docs.unity3d.com/Manual/webgl-input.html
Similar issue issue here. I use the Unity WegbGL standard template output HT$$anonymous$$L page just with a single text input field containing text. $$anonymous$$eyboard input disabled allows keyboard input in the text input field using
#if !UNITY_EDITOR && UNITY_WEBGL
WebGLInput.captureAll$$anonymous$$eyboardInput = false;
#endif
$$anonymous$$ouse clicks can position the cursor in the text input field. Selections can not be performed in the field, with the mouse (i.e. mouse left-click-hold-drag selection).
Your answer
![](https://koobas.hobune.stream/wayback/20220612084450im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Pass mouseevents from Iframe to unity application (WebGL) 0 Answers
Unity 5.2.2 webgl bundle loading failing 1 Answer
error: Failed to decompress data for the AssetBundle, when starting a web gl game on a hosted server 1 Answer
WebGL Shader compile issues 1 Answer
WebGl execute on a 32bit BROWSER 0 Answers