Search Unity

Text Mesh Pro Input Field - Strange fading at edge of text when scaled

Discussion in 'UGUI & TextMesh Pro' started by Romano, Sep 29, 2019.

  1. Romano

    Romano

    Joined:
    Nov 27, 2013
    Posts:
    76
    Hi there, I'm wondering if anyone has seen a strange fading effect on their TMP input fields when they are scaled up? Like on the left hand side in this image:

    eg1.jpg

    It seems like the issue is something to do with the text area rect mask, when this is toggled the text goes back to normal. I'm unable to mess with the margins in this case and I have to allow the parent transform to be scaled. The more it scales, the worse the fading effect. But it's completely fine when the scale is at 1.

    For the moment I can live without the rect mask, but it would be good to know how to fix this. Has anyone had a similar experience?

    Thanks!
     

    Attached Files:

    • eg2.jpg
      eg2.jpg
      File size:
      26.8 KB
      Views:
      392
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The parent is being scaled?

    Are you able to create a simple reproduction scene of this? Can you share the steps to reproduce this?

    P.S. Be sure to look into the debug section of the Material Inspector to verify the Softness value X and Y are set to zero. These control the softness of the mask.

    upload_2019-9-29_13-4-27.png
     
    Last edited: Sep 29, 2019
  3. Romano

    Romano

    Joined:
    Nov 27, 2013
    Posts:
    76
    Hiya, thanks for your reply!
    In the material settings the mask appears to be set to off.
    upload_2019-9-30_23-3-58.png
    The root is being scaled, the text is nested in a few other game objects.
    I followed the steps from another forum post where you explained how to use an input field with a content size fitter to make the rect transform scale with the text. It involved putting a layout element on the placeholder text. I spent ages searching for the post but now I can't find it for the life of me.

    If this doesn't help I can look into reproducing the problem in a small scene.
    Thanks!
    Romano
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    That would be most helpful as being able to reproduce an issue is almost always the hardest part.