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

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 :)