Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Display Language support

Discussion in 'UI Toolkit' started by Lieene-Guo, Apr 15, 2021.

  1. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    The current version of UI builder. Does not display Oriental languages. Like Chinese, Korean or Arabic.
    UXML doc support Unicode and when display in editor like Inspector. These languages are fine. It's probably because the Font asset used by UI builder does not contain those charactors.

    Version: "com.unity.ui.builder": "1.0.0-preview.14"
     
  2. SimonDufour

    SimonDufour

    Unity Technologies

    Joined:
    Jun 30, 2020
    Posts:
    515
    This is an area under active development. You will need to use a font that contain the characters
     
    Last edited: Apr 15, 2021
  3. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    Hi @Lieene-Guo !

    Thanks for reaching out. To be more specific, multi-language support and dynamic OS font will be available in 21.2 without the com.unity.ui package. We are looking to backport those features to previous versions (21.1 and 20.3) with preview-15 or preview-16.

    Unfortunately, like @SimonDufour pointed out, the best workaround, for now, would be to use a Font that contains the characters you need.

    An interesting alternative using FontAsset, would be to assign fallback fontassets that contain the characters you are looking for to your main FontAsset.

    Here's a screenshot of our fallback fontassets table for Linux:
    upload_2021-4-15_19-59-31.png

    Let me know if you need more guidance to set this up.
     
    lang_fox likes this.
  4. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    I tried setting "Default UITK Text Settings" to use a FontAsset supports Chinese
    upload_2021-4-16_9-50-41.png
    But It looks like It's not helping UI Builder's Inspector at all.
    If you look at the inspector panel to the right. Still, it cannot show Chinese characters.
    Looks like UI build is not using "Default UITK Text Settings" for it's inspectors
    upload_2021-4-16_9-49-49.png
    I can manage to use the built UXML anyway as I can choose which font I use for text elements.
    It's just annoying when using UI builder. I never know what I have typed in the inspector..
     
  5. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    Unfortunately, input fields still use the legacy text system. Could you try the same string of text in an input field of the InspectorWindow like so:
     

    Attached Files:

  6. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    InspectorWindow works find with Chinese. It is just a UI builder inspector problem.
     
  7. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    440
    This seems fixed on the latest version of Unity (21.2), but just to make sure could you share the string of characters that don't work on your side? Also, we will backport multi-language support to the package for preview-15 or preview-16.

    Thanks!
     

    Attached Files: