Search Unity

TextMesh Pro In a script, is there a way to get the Default Sprite Asset path?

Discussion in 'UGUI & TextMesh Pro' started by AcademyOfFetishes, Mar 10, 2019.

  1. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    I write automated tests, and I noticed that after I installed a plugin, the Default Sprite Asset path got reverted to the default. As a result, parts of my text stopped rendering sprite tags. Now that I know the Default Sprite Asset path can be reverted, I'd like to write a test that its value should be "TMPSprites/" so this doesn't happen again without me noticing. My question is, how can I get the Default Sprite Asset path in a script? It comes from TMP Settings.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You can access this information via the TMP Settings property below.

    Code (csharp):
    1. public static string defaultSpriteAssetPath
     
    jrumps and AcademyOfFetishes like this.