Search Unity

2018.1.9 to 2018.4.2 update causes TMP Atlas to double in size

Discussion in 'UGUI & TextMesh Pro' started by wettrix, Jun 17, 2019.

  1. wettrix

    wettrix

    Joined:
    May 25, 2015
    Posts:
    3
    I have a major headache that I don't understand so I would like some help on this.

    I recently upgraded from 2018.1.9f2 to 2018.4.2f. During this process I also updated TMP from 1.3.0 to 1.4.1.
    This all worked as intended but I had to add separate my 4096 Atlas to four 2048 Atlas because a few clients Low spec android devices can't read bigger textures so I diveded them all and setup a fallback system. This all works fine and everything except in memory my font asset went from 16mb to 32mb. I have tried different Render Mode but nothing changed the size. So by doing a test, I took the 2018.1.9f2 Atlas and rendered it in 2018.4.2 and I could render the characters and it only took up 16MB of memory in the process.

    What has changed in the Font Creator flow that makes the Font Asset to double in size in build?

    These are my settings for each Unity version
    2018.1.9f2
    Screen Shot 2019-06-17 at 12.31.36.png
    2018.4.2f
    Screen Shot 2019-06-17 at 12.31.36.png

    I just use a 4096 image here as a test model between versions. I tried also building in different Render Modes but nothing changed the size

    As a temporary fix atm I will build all my Font Atlasses in 2018.1.9f2 for the time being and export them to 2018.4.2. But I would like to know why this occurs, and is there any fix for this?

    Other note is that all my release platforms got increased in memory. I did change NET 4, and Android build also got upgraded to IL2CPP for 64bit support.

    Thanks in advance to anyone that can help me out with this.
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Textures that are set to Read / Write will take 2x the memory. So if the font asset is set to Dynamic, it will be set to Read / Write and as such will take more memory.

    If your font assets are static, then make sure you set them as Read-only by disabling the Is Readable flag with the Inspector in Debug mode.

    upload_2019-6-16_20-56-23.png
     
  3. wettrix

    wettrix

    Joined:
    May 25, 2015
    Posts:
    3
    Thank you very much.

    I went in to the debug settings and they were set to IsReadable. I guess when you build a static or dynamic they are always set as IsReadable.

    Thanks for the quick reply.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    When the font assets are created via the Font Asset Creator, they should be set to IsReadable = false. If they are created via the context menu or Dynamic then they will be set to IsReadable = true which is required to be able to modify the atlas texture to add glyphs to it.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,756
    Hey are you sure you manually updated from 1.3.0 to 1.4.1, or did Unity auto update to 1.4.1 as you installed 2018.4.2?
     
  6. GustavNinja

    GustavNinja

    Joined:
    Jun 13, 2016
    Posts:
    96
    I manually installed TMPro. I did start from 2018.4f and later just updated so I don’t know about the forced update.
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As far as I know going from 2018.4 to some other release of 2018.4 should not change the package versions. That is unless the Packages folder is deleted.

    Are you able to reproduce this in some new project using the older version and switching to the newer version of 2018.4?