Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

A couple of problems with vertical layout group

Discussion in 'UGUI & TextMesh Pro' started by Redden44, Jul 21, 2016.

  1. Redden44


    Nov 15, 2014
    Hey, I'm trying to make a tooltip which automatically scale with the text and I'm using the vertical layout group.
    If you check the picture below please, the tooltip on the left is the one I'm trying to make, while the one on the right is an old tooltip which I scale via script.

    The first problem I have is how can I move the "Level" text on the same line as the "Rarity" text like the tooltip on the right (in this case there is "Epic item" on the left and "Level 1" on the right of the same line). The vertical layout group put one text below the other, so I don't know how to keep two different texts on the same line. I tried to put the "Level" text inside the "Rarity" one as a child and it works inside the editor, but it disappears while in game.

    The second problem is how do you add spaces between the texts? Right now I just added an empty text and kinda there a better solution? Should I split the texts in different panels and add a vertical layout group to each object and finally use the top and bottom spacing to create space between the different panels? Could it work?

    Thanks :)