Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    41
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,581
    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.