Search Unity

Bug Set color in runtime with underline causes letter disappear

Discussion in 'UGUI & TextMesh Pro' started by Grelle, Jan 26, 2021.

  1. Grelle

    Grelle

    Joined:
    Oct 14, 2015
    Posts:
    15
    Hello.
    In Unity 2020 bug was founded, textmesh pro ver 3.0.3 verified.
    We have textmesh, with FontStyle = Underline (not tags). It's like web-link. When we pressing it, we coloring textmesh
    Code (CSharp):
    1. private void ChangeColor(Color color)
    2.         {
    3.             if (_tmp == null) return;
    4.             _tmp.color = color;
    5.         }
    After pressing part of letters are dissapearing.
    If we doesn't color textmesh, letters does not disappear.
    If we disable font style (without underline), letters does not disappear too!
    But together we have result on screenshot.

    Some testes: if you change text himself when coloring (f.ex. add and delete space) - letters appears back. "Rebuild" without changing text doesn't fix letters.

    Bug not work in TextMesh Pro ver 3.0.1, so wwe downgrade plugin on this moment.
    Can you pay attention to it, please?
    upload_2021-1-26_12-21-38.png
     
  2. Grelle

    Grelle

    Joined:
    Oct 14, 2015
    Posts:
    15
    And suddenly i found some cases in prefabs, outside Run mode, but couldn't see any logic, what is going on. It is colored textMeshes with Underline. One of textmeshes refreshed when I clicked on it, but another stay the same, with disappeared letters. (ver 3.0.3 still, just another app)
     
  3. yoing945

    yoing945

    Joined:
    Jul 9, 2021
    Posts:
    1
    I also ran into the same problem. When i underline and change color tmp in runtime, this problem will arise.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Can you provide an example script / scene / project that would enable me to take a closer look at this?