Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL Input fields are not working on webpage with Unity WebGL

Discussion in '5.2 Beta' started by rene_prins, Aug 11, 2015.

  1. rene_prins

    rene_prins

    Joined:
    Oct 3, 2013
    Posts:
    2
    Hi,
    I'm getting stuck with an issue. I integrated my Unity WebGL build into a webpage with some input fields. When the scene is completely loaded the input fields are not working anymore. I found a lot of solutions (Google, Unity forum) but without any success. (such as doNotCaptureKeyboard: false)
     
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,072
    Does it work without being integrated into the webpage? Does it work with a non-beta build?

    Can you submit a bug report and ping the number here?
     
  3. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    the DoNotCaptureKeyboard technique is no longer supported. Instead you need to use WebGLInput.captureAllKeyboardInput, which is just a boolean that you set at runtime via script.

    There is a thread about that here:
    http://forum.unity3d.com/threads/disable-enable-keyboard-in-runtime.336426/

    Just make sure you are on the latest 5.2 Beta build.