Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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

    JulianWallerius

    Joined:
    Dec 13, 2020
    Posts:
    2
    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.
    Thanks