Search Unity

How to create text with dynamic height?

Discussion in 'UGUI & TextMesh Pro' started by KirillKun, Mar 8, 2019.

  1. KirillKun

    KirillKun

    Joined:
    Jul 21, 2016
    Posts:
    45
    How to create text with dynamic height? To adjust the height to the amount of text


    p.s. I need it for scroll rect with srcollbar
     
    Last edited: Mar 8, 2019
    dominikk95555 likes this.
  2. KirillKun

    KirillKun

    Joined:
    Jul 21, 2016
    Posts:
    45
    Resolved:
    Create Scroll View
    Add content "Vertical Layout Group" with parameters "Child control size", check width and heigth. And "force expand" check width.
    Add content "Content size Fitter", set "Vertical fit" to "Preferres size"