Search Unity

Question Allow text input on web & Unity content?

Discussion in 'Web' started by andyz, Feb 5, 2024.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Can we allow keyboard input both in Unity content and in surrounding or over-laid html controls?
    Because it seems like you can have one or the other with WebGLInput.captureAllKeyboardInput, but what if you want both depending on what has focus?

    Docs say "To make HTML elements receive a keyboard input, set WebGLInput.captureAllKeyboardInput to false. This way, the application receives input only if the WebGL canvas has focus." But for me the UI in the webgl content is not receiving input if false