Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Layout group problem

Discussion in 'UGUI & TextMesh Pro' started by ManAmazin, Oct 14, 2014.

  1. ManAmazin

    ManAmazin

    Joined:
    Aug 7, 2013
    Posts:
    246
    ok so still working out learning new UI( i know we all pretty much are)
    but im finally wrapping my heading around instantiating objects at runtime, mainly a lobby list my issue with vertical layout group is it stretches my prefab if say there is 2 games vs 5 available... i would like my prefab to stay the same size regardless of games available inside the vertical layout please help me if im missing something small lol
     
  2. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,266
    There is a "Child Force Expand" option on the Vertical Layout Group component that sounds like it might be what you need.
     
  3. ManAmazin

    ManAmazin

    Joined:
    Aug 7, 2013
    Posts:
    246
    right i seen that but if i disable it shirks my gameobject to a horrible skinny sized prefab lol look very weird
     
  4. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,266
    It sounds like you need to add a LayoutElement with preferred size to your list entry GameObject.
     
  5. ManAmazin

    ManAmazin

    Joined:
    Aug 7, 2013
    Posts:
    246
    ahhhhhh i knew it was something small i was missing smh thanks alot!!