Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    5,676
    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:
    716
    Awesome! I kind of wanted to freeze the version, that's why I didn't try upgrading before. Thanks for the quick reply!
     
unityunity