Search Unity

TextMesh Pro Underline / Underscore not modified by vertex color

Discussion in 'UGUI & TextMesh Pro' started by Johannski, Jul 27, 2017.

  1. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    The Underline seems to be only modifiable by the face color, but not the vertex color. I tried looking into the shader color, but I wasn't able to pinpoint the code where you are modifying the underline (Using TMP 1.0.55.0b8).
    Did anything change since that version or can I modify the shader in the desired way? Or do I need to create a new material with black face color in order to get a black underline?


    (I would like to get the color of the outline black, when the vertex color is black)

    Cheers
    Johannes
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This behavior was addressed in a subsequent release of TMP. Please see the release notes about Beta 9.

    By default the underline or strikethrough color is controlled by the vertex color then multipled by faceColor.

    When using the <u> or <s> you can now add a color attribute to independently control the color of the underline or strikethrough. <u color=#ff800080>Orange underline</u> and similarly for strikethrough.
     
    TurleyE and Johannski like this.
  3. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Awesome! I kind of wanted to freeze the version, that's why I didn't try upgrading before. Thanks for the quick reply!