Hello,
I found that Unity Editor and Unity’s build-in UIs are very buggy when it comes to typing Chinese words. I have submitted a bug report to Unity yesterday. There are many users that would be typing Chinese words in Unity and Input Field, but surprisingly I didn’t find any post in the issue tracker that are mentioning these issues. My game is largely based on Chinese words and I need to type Chinese in the Editor, these bugs have caused hindrance to my development. So I spent some time writing bug report and recorded a video, and here is my bug report:
I am using Unity 2018.2.18f1 (now I have upgraded to 2018.3.f02, but the bugs still exist) and I am a Unity Plus user, my operational system is Windows 10.
I am going to report 4 bugs here:
Bug#1
I am using “Microsoft Bopomofo” to type Chinese characters in the input field of Inspector. I found that if I don’t hit Enter to confirm the typing and click somewhere else, the characters that I inputted will be duplicated for unknown reason, there is certainly something wrong with the Unity’s source code. After the bug occurs, we won’t be able to type Chinese until we hit “Ctrl” + “Space”.
Bug#2
The same issue happens when I create a Unity’s build-in Input Field UI, and then I run the game, after typing some Chinese characters in the Input Field using “Microsoft Bopomofo” and not hitting the Enter key, I click somewhere else, the Chinese characters in the Input Field get duplicated.
Bug#3
If I create multiple Unity’s build-in Input Fields and replace the fonts of Input Field, both placeholder and text, with a Chinese font, run the game, type some Chinese characters in the first input field without hitting Enter, and then type some Chinese characters in the second input field without hitting Enter again, Unity will throw an error message and the text of every input field glitches for unknown reason.
Bug#4
Once we reproduce either Bug#1 or Bug#2, we won’t be able to type Chinese in Unity or in the build-in Input Field UI, but we still can type Chinese on other software other than Unity or the game that is built with Unity. We have to hit “Ctrl”+“Space” to be able to type Chinese again.
I have attached a video file named “Bugs Reproducing Demostration.wmv” showing how exactly we can reproduce the bugs.
Here are the instructions to reproduce the bugs:
Bug#1
Step1: create a brand-new Unity project
Step2: create a build-in Text UI
Step3: type some Chinese characters in the input field of the Text component in the inspector without hitting Enter key
Step4: click somewhere else, the Chinese characters in the input field of Inspector will get duplicated
Bug#2
Step1: create a brand-new Unity project
Step2: create a build-in Input Field UI
Step3: run the game
Step4: type some Chinese characters in the Input Field without hitting Enter
Step5: click somewhere else, the Chinese characters in the Input Field will get duplicated
Bug#3
Step1: create a brand-new Unity project
Step2: create three build-in Input Field UIs
Step3: for demonstration sake, download free Chinese font “SourceHanSerifTW-Regular.otf” here (the bug doesn’t depend on the Chinese font the user is using), source-han-serif/SubsetOTF/TW/SourceHanSerifTW-Regular.otf at release · adobe-fonts/source-han-serif · GitHub
Step4: replace the fonts of the Input Fields, both placeholder and text, with the Chinese font we have just downloaded
Step5: run the game
Step6: type some Chinese words in the first Input Field without hitting Enter key
Step7: hit “Ctrl” + “Space” to be able to type Chinese again
Step8: select the second Input Field and type some Chinese words in the second Input Field without hitting Enter key
Step9: click somewhere else, Unity will throw an Invalid Operation Exception error in the console and the texts in the Input Field glitches
Bug#4
Step1: after reproducing Bug#1 or Bug#2, we won’t be able to type Chinese using Microsoft Bopomofo until we hit “Ctrl”+“Space”.
PS. I actually don’t know why we can fix Bug#4 by hitting “Ctrl”+“Space”, I found this method by accident.
Are you having these issues as well?