Search Unity

Question [Question, Feature Request] About WebGL IME (TMP_InputField)

Discussion in 'Web' started by hwk9120, May 9, 2023.

  1. hwk9120

    hwk9120

    Joined:
    May 9, 2023
    Posts:
    17
    Hello, I am developing a WebGL project.
    In my project, it is very important to write long sentences like letters.
    (+ Korean is my language and I need IME to use korean characters)

    All characters should be clickable and selectable, because users should be able to easily modify the contents of the letter they are writing.

    For this, I've read a lot on the forum. In conclusion, I created html textarea of the same size as InputField and modified the font, font size, line spacing, word spacing, letter spacing of textarea as much as possible to make it completely the same as InputField.

    Still, textarea could not have the same layout as InputField. This is assumed to be because the font asset that Unity generates is different from ttf or otf. I think this is something that cannot be fixed because it is related to rendering.

    Instead, I was wondering if IME is still unavailable on the WebGL platform, and if it will not be available in the future. (Whether to support this in the future or not)

    I wish I could use IME in Unity WebGL to fully use InputField.


    The sentences can be awkward because I used a translator.
    Thank you.
     
    Last edited: May 9, 2023
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    What exactly is IME?

    Have you tried UI Builder and UI Elements? Perhaps that works better than legacy UI input fields.

    I have a hunch that maybe you simply will want to use a fixed-width (monospace) font. That would work for letters in the style of a typewriter, but not handwritten styles.
     
  3. hwk9120

    hwk9120

    Joined:
    May 9, 2023
    Posts:
    17
    Oh, I didn't write down the important part.

    Basically, we cannot enter combination characters such as Korean, Japanese, and Chinese in the Unity webgl build. These combination characters are usually entered using IME, which WebGL does not support.