Search Unity

UI.VerticalLayoutGroup changes broke my game UI?

Discussion in '5.5 Beta' started by tessellation, Nov 15, 2016.

  1. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    102
    My layout worked fine in 5.3.6. I followed the instructions here when I first build it. In 5.5.0b11, now my text objects inside a VerticalLayoutGroup are getting heights auto-set to values like 4593 and run all sibling text objects off the screen. The text objects have a ContentSizeFitter with Vertical Fit set to Preferred Size. Then the parent VerticalLayoutGroup also has a ContentSizeFitter to make sure it resizes with the stacked children. I tried disabling the ContentSizeFitter components in the child text objects but then the height then gets set manually, which isn't what I want.

    This doesn't seem to be documented anywhere, what does the new "Child Control Size" do? I tried turning that on and off for Height with various combinations of child ContentSizeFitter being on and off and it didn't seem to have the effect I wanted. I feel like I'm groping in the dark here for a solution, so I could use some help.

    Seems like there's just a bug with ContentSizeFitter where it's not setting height correctly from the Text Preferred Size like it used to? I posted this as Case 851570
     
    Last edited: Nov 15, 2016
    Dillinger likes this.
  2. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    371
    I've also had vertical layout groups behaving differently when upgrading from b10 -> b11. Seems a bit late in the beta cycle to introduce a drastic layout change!

    EDIT: In my case it seems to be caused by a Text element having a massive preferred height layout property (80pt text with a custom font). I set "horizontal overflow" to "overflow" instead of "wrap" and it is now a more sensible value, but it's still a bug I think.
     
    Last edited: Nov 18, 2016
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,581
    Hi,
    A fix for this is currently going through QA.
     
    tessellation likes this.
  4. shadiradio

    shadiradio

    Joined:
    Jun 22, 2013
    Posts:
    75
    Did this not make it into 5.5.0f1? It seems that layout groups are still broken in today's build.
     
  5. topaz7

    topaz7

    Joined:
    Dec 15, 2012
    Posts:
    76
    It just broke my UI too. Had to go back to 5.4.
     
  6. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,401
    *cancels 5.5.0f1 download*
     
    MrEsquire likes this.
  7. Alex-Lian

    Alex-Lian

    Guest

    Fix should be in f3.
     
  8. saviemedia

    saviemedia

    Joined:
    Nov 8, 2016
    Posts:
    6
    Hi Alex-Lian, do you have any ETA for f3 version? Thank you
     
    Last edited: Nov 25, 2016
  9. Jmangles

    Jmangles

    Joined:
    Aug 1, 2015
    Posts:
    26
    I'm experiencing an issue with Text in general right now where it won't resize the text box based on its contents. Before a RectTransform would vertically size itself to fit in horizontally wrapped text but right now it's only responding to newlines for expanding the text area.
     
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,581
    Could we get a bug report + reproduction case for this please?