Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

TextMesh Pro Font Atlas takes up too much memory.

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by LeopardLiang, Aug 2, 2019.

  1. LeopardLiang

    LeopardLiang

    Joined:
    Feb 14, 2019
    Posts:
    9
    As shown below
    upload_2019-8-2_15-33-51.png

    upload_2019-8-2_15-32-57.png

    The memory displayed in the profiler does not match the one displayed in the Inspector.
    Any Help?
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,299
    Dynamic Font Assets require setting the Texture flag to make it readable which typically results in 2X the memory footprint.

    Static Font Assets has this isReadble flag set to false and as such those textures take less memory.

    See the following about this flag.
     
  3. LeopardLiang

    LeopardLiang

    Joined:
    Feb 14, 2019
    Posts:
    9
    Thanks for the reply.
    But..Unfortunately....it is static Font Assets, even if I turn it off Is Readable, it also takes up twice as much memory
    upload_2019-8-2_16-5-41.png

    upload_2019-8-2_16-8-57.png

    upload_2019-8-2_16-9-20.png
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,299
    Was the IsReadable flag always set to false or did you change it and then didn't notice any difference?
     
  5. LeopardLiang

    LeopardLiang

    Joined:
    Feb 14, 2019
    Posts:
    9
    It is true when I just created the font.
    I changed it to false and nothing changed.
     
  6. LeopardLiang

    LeopardLiang

    Joined:
    Feb 14, 2019
    Posts:
    9
    Maybe I should build a debug package to test?
    Sometimes the Profiler of Editor is not so accurate.
     
  7. LeopardLiang

    LeopardLiang

    Joined:
    Feb 14, 2019
    Posts:
    9
    Hey Stephen!
    I built a development apk to test and found that it doesn't take up twice as much memory.
    Sure enough, the Profiler of Editor is not trusted.
     
    Stephan_B likes this.