Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. 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
  8. 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,518
    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,518
    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:
    47
    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:
    8
    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,518
    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,518
    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,518
    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:
    245
    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,518
    I'll ask around internally to get an update on this.
     
  17. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    87
    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:
    307
    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:
    245
    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,518
    I have asked again internally. Will provide update as soon as I get an answer.
     
    ganaware likes this.
  21. Tyrannicus100BC

    Tyrannicus100BC

    Joined:
    Apr 24, 2015
    Posts:
    1
    We just upgraded to 2017.4.2f2 and are pretty disappointed by this bug.

    We have a team of a dozen designers that do regular prefab work and now their git checkins are littered with these thrashes. We had tried asking the team not to check in these specific types of changes, but when you're a non-technical person already intimidated by git, it is really easy to accidentally screw up a checkin and loose work.

    The UI system should not be modifying assets from the project when in play mode.
     
  22. awmcclain

    awmcclain

    Joined:
    Dec 24, 2013
    Posts:
    8
    FWIW this is our biggest day-to-day annoyance. We're anxiously waiting for a backport.
     
  23. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    245
    So um... I don't want to prematurely put away the pitchforks yet, but I pulled 2017.4.4f1 and I think maybe this is fixed there.

    I still don't see this particular issue mentioned in the patch notes for 2017.4.x, but I stopped and started our project maybe 10 times this afternoon and didn't receive any squirrely diffs in my font assets.

    Anyone else noticing that?
     
  24. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,060
    Honestly i'm not sure why it took so long to get out. but i'm looking at our internal dev branch code base and the latest release 17.4.4f1 should have the proper fix included.
     
    slumtrimpet likes this.
  25. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,518
    As per @phil-Unity's feedback, it appears fine to store the pitchforks back in the shed in this case :)
     
    slumtrimpet likes this.