Search Unity

Grid,Horziontal Layouts

Discussion in 'UGUI & TextMesh Pro' started by rickw, Aug 27, 2014.

  1. rickw

    rickw

    Joined:
    Jul 7, 2013
    Posts:
    15
    Hi,

    So, I'd like to create my own type of layout.

    Essentially this will act like a Horizontal Layout, but when items contained within the layout are hidden, then the items within the layout will not be scaled and will collapse to either the left or the right i.e.

    A B C D

    Hide B and you'll get

    A C D

    Are there an interfaces etc or abstract classes that I should be implementing/extending?

    There doesnt seem to be an easy way to find what tools are available in the new UI toolkit!

    Cheers
     
  2. rickw

    rickw

    Joined:
    Jul 7, 2013
    Posts:
    15
    Scratch that.

    You can achieve this using Grid layout and using the alignment settings!
     
  3. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    Right. You can probably also achieve it with the Horizontal Layout Group if you add Layout Elements to the children and set the flexible width to be 0 on them.