Search Issue Tracker

Fixed in 2018.1.X

Fixed in 2017.3.X, 2017.4.X, 2018.3.X

Won't Fix in 2017.2.X

Votes

1

Found in

2017.2.0p1

2017.2.0b1

Issue ID

967024

Regression

Yes

Canvas Batching System Dirties Project User-Created Materials when using Rect Mask 2D

uGUI

-

Steps to reproduce:
1. Open user attached project
2. Enable the "Rect Mask 2D" component on the "Panel" Gameobject
3. Play the scene, then stop the scene
4. Click the menu "File" -> "Save Project"
5. Open the "CustomMaterial" asset in a text editor and notice that it now has "UNITY_UI_CLIP_RECT" as a shader keyword, it is a persistent project asset and now dirtied by the system. This would cause it to show up as a changed file on all source control systems, confusing developers and causing confusing merge conflicts.
6. Now, DISABLE the "Rect Mask 2D" component on the "Panel" Gameobject
7. Again play the scene, then stop the scene
8. Again click the menu "File" -> "Save Project"
9. Again open the "CustomMaterial" asset in a text editor and notice the "UNITY_UI_CLIP_RECT" shader keyword is now gone.

Expected result: canvas batching system should not dirty project user-created materials

Reproduced in: 2018.1.0a3, 2017.3.0b8, 2017.2.0b1
Not reproduced in: 2017.2.0a4, 2017.1.2p3,
Regression since: 2017.2.0b1

Fixed in: 2019.1.0a13, 2018.2.0a3, 2018.1.0b8

Comments (4)

  1. ganaware

    May 17, 2018 04:00

    +1
    Please backport this to 2017.4.x (LTS).
    This problem constantly dirties our vcs repository.

  2. unity-sb01

    May 14, 2018 03:47

    +1
    Please backport this to 2017.4.x (LTS).
    This problem constantly dirties our vcs commits.

  3. tessellation

    May 02, 2018 20:56

    This problem is causing extra work for us, always having to verify that material asset diffs are legitimate changes or random flip-flips of the ClipRect2D keyword. Please back-port this to 2017.4.X Please please pretty please. Thanks!

  4. slumtrimpet

    May 01, 2018 09:57

    It appears this fix STILL hasn't hit the 2017.4 LTS branch. If you are targeting that release toward serious dev teams, this would be a good fix to port over there...

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.