Search Unity

Freeze when generating Chinese

Discussion in 'UGUI & TextMesh Pro' started by RakNet, Apr 21, 2021.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    Trying to add Chinese
    upload_2021-4-21_5-19-53.png
    So I copied all those in, pressed Generate Font Atlas, just sits there forever

    upload_2021-4-21_5-20-28.png

    Not sure if this was asked elsewhere, Unity's forums search feature sucks.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I just quickly tried to generate a font asset using the above range and it does indeed seem like there might be an issue with the packing.

    Since it is already 3:00 AM for me, I will be going to sleep but I will take a closer look at this tomorrow and follow up as soon as I have more information.

    Out of curiosity, any reason you are looking to use a static font asset the contains all these characters vs. a static font asset that only contains the known characters used in the project combined with a dynamic font asset to handle whatever other characters that might be coming from user input at runtime?
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I let the generation process do its thing last night and although it took 2,783 seconds to figure out the packing.

    upload_2021-4-21_12-16-51.png

    upload_2021-4-21_12-17-9.png

    Packing is an iterative process and given the range of characters you specified includes 81520 characters, it takes a long time to short out.

    My recommendation as per my previous post is to use a combination of static and dynamic font assets.
     
  4. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    Hey thanks for looking into this, I really appreciate it!

    "Out of curiosity, any reason you are looking to use a static font asset the contains all these characters vs. a static font asset that only contains the known characters used in the project combined with a dynamic font asset to handle whatever other characters that might be coming from user input at runtime?"

    Re: Known characters and dynamic font assets, I was testing that I can display Chinese before I hired the translation company. I'll try your suggestion, thanks again.

    The following videos should prove useful here (if you have not watched them already)



     
    Last edited by a moderator: Apr 23, 2021