Symptoms:
- I get an exception when typing Asian characters (e.g. Korean, Japanese, Chinese, Thai) but don't know why.
- I have noticed some strange bugs occurring with UI InputField.
Cause:
There could be many different reasons for these bugs to occur, such as caret position handling, font rendering issues, or Unicode character processing. While we can't always determine the exact cause, these issues commonly occur when using the legacy UGUI Text and InputField components instead of TextMeshPro (TMP).
Resolution:
We strongly recommend using TextMeshPro components instead of the legacy UGUI Text components. TextMeshPro offers superior Unicode support, better international character handling, and improved font asset management - all crucial for proper Asian character input and display.
-
To switch to TextMeshPro:
- Replace UI Text components with TextMeshPro - Text (UI)
- Replace InputField components with TMP - Input Field
-
Configure appropriate fonts that support your target character sets
Note: TextMeshPro is included by default in Unity 2022.3 LTS and later versions. Unity only provides critical bug support for legacy UGUI components, with no new feature development planned. TextMeshPro receives active updates and bug fixes, making it the recommended solution for all text rendering needs.
-
If you're already using TextMeshPro but still experiencing issues:
- Update to the latest Unity LTS version (2022.3 LTS or newer)
- Ensure your font assets include the necessary character ranges for your target languages
- Verify your TMP settings support the required Unicode ranges
-
Advanced Users Only:
- If you must continue using UGUI components and need to modify their behavior, you can reference the TextMeshPro source code for implementation guidance. However, this approach is not officially supported. For information on modifying built-in packages, see the Unity documentation on Package Manager or How can I modify built-in packages?
- If you must continue using UGUI components and need to modify their behavior, you can reference the TextMeshPro source code for implementation guidance. However, this approach is not officially supported. For information on modifying built-in packages, see the Unity documentation on Package Manager or How can I modify built-in packages?
Note:
If you continue to experience bugs after following these steps, Please report them via Unity's bug reporter with specific reproduction steps.