Search Unity

Question Is it possible to set material preset in style sheet?

Discussion in 'UGUI & TextMesh Pro' started by j-d-e-v, Feb 24, 2024.

  1. j-d-e-v

    j-d-e-v

    Joined:
    Aug 1, 2016
    Posts:
    6
    I want to change the material preset of a text through a style sheet, which seems possible according to this link. I am able to change other things using tags in the style sheet, such as the size and font, but when I try to change the material preset it doesn't work and just displays the tags with the text.

    Edit: Turns out the project had several folders for fonts and the material I was trying to set was in a folder that wasn't the same as the one set in TextMesh Pro project settings, so TMP couldn't find it.

    Also the docs in the above link have this sentence: "Font and material assets must be placed in specified in the TextMesh Pro settings Asset." which is missing some words/is hard to understand and can make it difficult to realize all the fonts(and material presets you make) need to be in the correct folder listed in the TMP project settings.
     
    Last edited: Feb 24, 2024