Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

ContentSizeFitter makes scene dirty!?

Discussion in 'Unity UI & TextMesh Pro' started by rakkarage, Nov 30, 2014.

  1. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    636
    I guess it is because it uses [ExecuteInEditor]?
    Is there any way around this?
    Is it a bug?

    Note: To replicate, must change horizontal or vertical to something other then (than?) unconstrained.
     
    Last edited: Nov 30, 2014
  2. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    Hey There,

    Looking at the code it seems that ContentSize fitter is missing the DrivenRectTransformTracker. This class is used to stop Unity from serializing values that are driven. You could always extended the class or get the 4.6 source code and add that component.
     
    rakkarage likes this.
  3. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    After playing with it I was wrong. It does seem to have a DrivenRectTransformTracker. It's watching W Delta and H Delta.
     
  4. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,304
    Yes, it's a bug. Thanks for the bug report you submitted to our bug tracker rakkarage, we're looking into it.
     
    rakkarage likes this.
  5. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,304
    We've identified and fixed the bug. The fix will be in one of the coming patches or releases (it didn't make it for patch 1).
     
    rakkarage likes this.
  6. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    636
    this used to be fixed, for a while
    now back in 5?
    thanks
     
  7. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,304
    Using your original bug report, I can't reproduce the issue in the latest version of the codebase we have. It's possible some fixes in 4.6 patch releases didn't make it to all versions of 5.x, but the fix will make it out sooner or later anyway (if it's not out already).
     
    rakkarage likes this.
  8. gadgetking

    gadgetking

    Joined:
    Oct 6, 2016
    Posts:
    1
    I seem to have this behaviour on 2017.3.0f3 (64-bit)
     
  9. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,055
    Also, when you select something, sometimes, an action called "Driving RectTransform" makes the scene dirty too.

    2017.3.0f3
     
  10. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,055
    Any news on this?
     
  11. alexandret-unity

    alexandret-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    2
    There is a fix related to driven properties making the scene dirty in 2017.3.1p1.
     
    Rodolfo-Rubens likes this.
  12. Cathero

    Cathero

    Joined:
    May 3, 2018
    Posts:
    1
    In 2018.1, the issue of "Driving RectTransform" causing Scenes to me marked as dirty upon scene-load is still (or again?) present.
     
    rakkarage likes this.
  13. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    269
    I have the same or similar issue with 2018.2.5f1.

    I'm using the content size fitter on the content within a scroll view. When I perform a build or reload the assembly, the scene is marked dirty. If the content size fitter is disabled, the scene remains untouched. The issue is likely related to the Canvas Scaler, because when I remove the Canvas Scaler, the problem seems to disappear.

    Reproduction project was reported (FogBugz 1081130).
     
    Last edited: Sep 14, 2018
  14. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    56
    Experiencing the same issue under 2018.2.8f1..

    It's quite annoying when Running Tests as well, because you have to go through an "Are you sure you want to close scene?" dialog every time you run the test.
     
    Rodolfo-Rubens likes this.