Search Unity

ContentSizeFitter locks Rect size until scene reloaded!

Discussion in 'UGUI & TextMesh Pro' started by andyz, Aug 8, 2018.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,279
    If you have a simple Text object on a canvas and add a ContentSizeFitter to it then when you choose Preferred Size it will lock the width/height of the Rect Transform as expected, but when you then change to Unconstrained or even delete the CSF component those elements remain locked!!
    You seem to have to reload the scene to fix it!

    known bug? 2018.2.1f1
     
  2. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    338
    A similar bug has already been posted here (and I believe logged) for layout groups causing the same lock.
     
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,279
    Ah I see - in fact anything that drives a RectTransform's values will cause those values to be locked, even when said object is removed from it, until scene reload.
    What a lovely bug introduced to 2018!!

    case #1069465
     
    BakuDigital and FernandoHC like this.
  4. BakuDigital

    BakuDigital

    Joined:
    May 9, 2013
    Posts:
    18
    Indeed, one more lovely bug. I wish updating a project in Unity would not be as painful as this every time... They should slow down on the features and work a bit more on stability.

    Anyway, is there an issue already open or should we open one? Can't find it, thanks.
     
    andyz likes this.
  5. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    338