Search Unity

Layouts and automatic sizing

Discussion in 'UGUI & TextMesh Pro' started by makeshiftwings, Oct 6, 2014.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    The documentation for Layouts ( http://docs.unity3d.com/460/Documentation/Manual/UIAutoLayout.html ) says this:

    This seems kind of pointless to me. Wouldn't it make more sense for the preferred size of a rect transform to be the actual size of the rect transform? Why reset it to zero, which would basically never be useful in any situation I can think of? If you have a widget like a button that is made up of sliced sprites and text, and it already has a size, it seems like pointless extra work to have to add a Layout Element to it and then manually type its current size in, just to make it work in a layout.