Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Size of text-Field is influenced by the text-string?

Discussion in 'UGUI & TextMesh Pro' started by JulianWallerius, Sep 16, 2021.

  1. JulianWallerius


    Dec 13, 2020
    Hey, I have a problem:

    I would like to have 2 (or more) text-GameObjects in one line, so that each GameObject has the exact same width. They need to have the same size.
    So I took a VerticalLayoutGroup, packed it on top of a Panel, set the LayoutGroup to control ChildWidth and arranged everything, so the text-GameObjects get streched across the screen. So good so far.
    But the text-Objects aren't edited to the exact same size, because the strings, that are in them, don't have the same length. So, if a string in a text-Object is longer than in a different text-Object, the width of the text-Object gets bigger, than it should be, when the space is divided equally. I don't want that.

    Maybe you can help me.