Search Unity

  1. Full schedule for #UniteBerlin is now available! Featuring talks on our roadmap, hands-on labs and much more! Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TextMesh Pro Text Mesh Pro Font Asset keeps auto-changing

Discussion in 'Unity UI & TextMesh Pro' started by Rational-MA, Nov 7, 2017.

  1. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    @Stephan_B Our Text Mesh Pro Font Assets keep showing up as changed in our source control. No one is touching the assets nor any TMP settings. It always has something to do with the "UNITY_UI_CLIP_RECT" shader keyword being added or removed. If we accept the change one way, it ends up eventually showing as changed back the other way.

    What is causing this? What can we do to prevent it?
    upload_2017-11-7_11-15-58.png
    Thanks!
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    This is not set specifically by TextMesh Pro and most likely the result of the Canvas / UI system. For this shader keyword to change, I would assume a 2D RectMask is being enabled and disabled which results in this change.

    What version of Unity are you using? I would suggest testing in Unity 2017.1 and 2017.2 to see if the behavior persists.
     
  3. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    We have been seeing this at least since in 2017.2 as well as 2017.2p1.
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    This behavior is the result of a change in 2017.2 where the 2D RectMask now uses a shader keyword. This is done by the Canvas batching system and as such would affect all materials.

    As Unity batches these materials, it is setting and un-setting this keyword and depending on the order of these batches, it may end up where the last batch sets or unsets the keyword. Ie. this will appear to be random.

    This behavior also affects all materials used by the canvas. Since the UI Default material is an instance which does not live in a user project, you are not seeing this behavior. But if you were to assign a specific material to any object or use a persistent asset like a TMP Material Preset, then you will see this behavior.

    Since this behavior will affect anything that uses a material that is persistent in the project (not only TextMesh Pro) I would suggest submitting a bug report on this. Please post the case number.

    Hopefully, the UI and / or Graphics team can figure out an alternative way of handling this which doesn't result in dirtying persistent materials in the project when using a 2D RectMask.
     
    slumtrimpet and CDF like this.
  5. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    Thank you for the explanation! Bug report submitted with test project.

    Case 967024

    I hope you can help speed up the development of a solution! It's been causing crazy merge conflicts for us in source control and we don't want to ignore random materials that could have valid changes as well.
     
    Paul-Sinnett and Stephan_B like this.
  6. bradbecker

    bradbecker

    Joined:
    Dec 26, 2014
    Posts:
    41
    Same problem here.
     
  7. Paul-Sinnett

    Paul-Sinnett

    Joined:
    Nov 12, 2010
    Posts:
    9
    I'm getting this too.
     
  8. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    Just an update from Unity "We have fixed this problem and it should not appear in the latest version (2018.1.0b8)."

    I requested if a backport is possible since we are in no position to move to 2018 beta and they replied with this

    "After talking with our developers, a backport for 2017.2 and 2017.3 is possible. We will let you know when the fix reaches a backport release :)"

    Hopefully it'll show up soon!
     
    slumtrimpet likes this.
  9. awmcclain

    awmcclain

    Joined:
    Dec 24, 2013
    Posts:
    4
    Hooray! We've been hit by this as well, when we have one scene that uses a clipping rect and another that doesn't.
     
  10. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    This is fixed in 2018.1 for certain. I believe this is also the case in the latest release / patch of 2017.3.

    What version of Unity are you using?
     
  11. ganaware

    ganaware

    Joined:
    Jun 19, 2015
    Posts:
    5
    I am using 2017.2.0p4. Please backport the fix to 2017.2 (or 2017.3) .
     
  12. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    I have asked internally to see what the plans are in regards to a backport on this behavior.

    This might be on a low priority (in terms of backport) given this is just an annoyance in terms of source control and not a breaking bug per say. But like I said it is an annoyance at any rate.
     
  13. ganaware

    ganaware

    Joined:
    Jun 19, 2015
    Posts:
    5
    How about LTS Release 2017.4.0f1?
     
    slumtrimpet likes this.
  14. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    It is my understand that the fix for this will be back ported down to 2017.2 and 2017.3. Not sure when the change will land but keep looking for it in a subsequent patch for those.
     
  15. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    238
    For what it's worth... the fix still doesn't appear to be in 2017.4.2.

    It seems the target audience for the LTS branch (serious dev teams) are the particular target audience annoyed by this bug, but yet no love. :)
     
  16. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    I'll ask around internally to get an update on this.
     
  17. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    86
    I'd really like to see this fixed also. It consumes a lot of time, constantly checking diffs. I'm on 2017.4.2 as well.
     
  18. Mikilo

    Mikilo

    Joined:
    Jan 29, 2013
    Posts:
    274
    Having it in 2017.4.2f2.
    Not seeing it in the latest patch.

    I hope it will be implemented in a future patch of 2017.4.
     
  19. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    238
    Hey Stephan, another LTS release and still no mention of this patch. Any feedback internally? Getting kinda silly now.
     
  20. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,207
    I have asked again internally. Will provide update as soon as I get an answer.