Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Is there a way to get a list of all the styles defined in the stylesheet?

Discussion in 'UGUI & TextMesh Pro' started by kheldorin, Jan 4, 2019.

  1. kheldorin

    kheldorin

    Joined:
    May 28, 2015
    Posts:
    22
    I want to be able to select a particular style from a drop down menu so I know it's definitely a valid style tag and then prepend the style tag to the text through code.

    Or even someway to reference a TMP_Style through the inspector?
     
    Last edited: Jan 4, 2019
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There is an internal list of styles but this is not currently exposed.

    I think adding some public function to get a list of available styles would make sense. This would then enable you to query this list and to do whatever else is needed.

    P.S. Sorry about the delay in replying.
     
  3. kheldorin

    kheldorin

    Joined:
    May 28, 2015
    Posts:
    22
    That sounds great. Looking forward to the update. :)
     
  4. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Was this added? Can't find a way to query all the styles in a sheet. Or even on the running default.
    I was looking forward into making a tool that would help me a lot in creating, testing and visualizing the styles.