Search Unity

Question Update TMP Font Atlas Texture by script

Discussion in 'UGUI & TextMesh Pro' started by Arkuni, Jun 1, 2022.

  1. Arkuni

    Arkuni

    Joined:
    May 30, 2013
    Posts:
    58
    Is there anyway to update the font atlas by script with the same options as when using the asset creator window?

    I have quite a lot of languages and lot of fonts, so I want to take the localization file, get all unique characters and then update all TMP font assets to only use those characters.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There are several users doing this already where I believe most of the necessary API functionality is exposed. You can use the TMP_FontAsset.AddCharacters... functions to populate font assets.