Unity Text Input Field not working in WebGL build

hello everyone, I need some help, I have been trying to fix this problem for weeks. the input field I have for getting username for my leader board will not let anyone type inside it. at first, I thought it was the leader board itself, so I basically went through my game and got rid of any warnings and error, turns out the leader board is working fine. its the input field. at this point I have no idea what to do, please help.
for reference, everything works fine in the PC build and inside unity.

link for the game is bellow, PLEASE PLEASE PLEASE HELP!!

Hello @Cloudmaking0, Have you eventually figured out how to fix the problem? I'm having the same issue… :(

4 Answers

4

I was able to get WebGL text input working on mobile by implementing GitHub - kou-yeung/WebGLInput: IME for Unity WebGL

Note that the text was oversized while typing on mobile but it does work. Not sure how to fix the size issue.

This says it doesn't work with iOS default web browser Safari which makes it kind of useless, unfortunately!

Hello. May be able to help you. I had the same problem when I used "TextMeshPro-InputField". Open the "WebGLInput.cs" file for this asset. Edit the OnSelect() method. var fontSize = Mathf.Max(14, input.fontSize); Set "input.fontSize" to an appropriate number. It worked on mobile's chrome and safari.

Hey, the only fix i really found was an on-screen keyboard which i found on git hub, i cant remember the exact name. Very weird problem though isnt it.

GitHub for fix it ( @Cloudmaking0 0 )

I eventually found a way that fixes the issue on my side (I had the exact same problem):

  1. Open Project Settings
  2. Go in “Player”
  3. Show HTML5/WebGL settings
  4. Set the Active Input Handling to “Both” instead of “Input System Package (New)”

Not sure exactly why unfortunately, but that fixed the problem.

We had to change this in our code: UnityEngine.WebGLInput.captureAllKeyboardInput = false; Posting this here in case anyone else has theirs set to false in code.