Search Unity

TextMesh Pro Dynamic Atlas Population taking a long time even for a single character

Discussion in 'UGUI & TextMesh Pro' started by Ushines, Apr 27, 2023.

  1. Ushines

    Ushines

    Joined:
    Apr 27, 2023
    Posts:
    1
    @Stephan_B Hello! I am hoping you can help me with an issue that I am having.

    You linked a video in a prior post: https://forum.unity.com/threads/how-do-i-use-default-system-font.1262888/#post-8020580.

    The video itself is:


    It shows the dynamic atlas population for a dynamic font asset populating around 20 Chinese characters in "the blink of an eye" and looks very good!

    However, for some reason whenever I try, it takes about 5 seconds to add just a single character. I was hoping you would be able to tell me what I am doing wrong such that I can get the speed from that demo video.

    I have reproduced the issue in a new 2D project with my Noto Sans font and a single scene with a single TextMeshProUGUI object. Here is a link to a zip with the sample project:
    https://drive.google.com/file/d/1bVrRk9rKAIr6iryWBXizl901SQrs4xII/view?usp=sharing

    I made one static font with atlases for the known characters I will need. Then as a fallback, I made a dynamic font to catch any others from user input (such as most of the CJK Unified Ideographs or the Hangul Syllables). The dynamic atlas starts as a 0x0 atlas as normal. Then I try to type a not-yet-included character into the TextMeshProUGUI text field and it takes about 5 seconds to add it to the atlas. For the purposes of testing, I have reproduced it with this character: 갆.

    Is there anything I can do to get the dynamic atlas to populate as fast as in that demo video?
     
    Last edited: Apr 27, 2023