Search Unity

[UIBuilder] How to make label width autosized to text width?

Discussion in 'UI Toolkit' started by TextusGames, Oct 7, 2019.

  1. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    Label width is not inheret text width.
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Mj-Kkaya and TextusGames like this.
  3. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    It is working! Thanks you.
     
  4. sasyda

    sasyda

    Joined:
    Mar 31, 2022
    Posts:
    9
    Hi there, i'm using persian text in my app, and the only way to get things going is by setting <line-height=-100%> to get the lines to be in the right order, which would actually change line direction and adds lines toward up and solves this issue, but then the problem is this auto inheritance of size (in height of container) somehow gets disabled.
    Is there any other work around or other ways to do it?
    tnx in advance.
     
    Last edited: Jan 31, 2024