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

Auto resizing text rect [Unity3D 4.6 new gui system]

Discussion in 'Immediate Mode GUI (IMGUI)' started by Saulius, Sep 12, 2014.

?

Any one missing this feature?

Poll closed Oct 13, 2014.
  1. Yes

    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Saulius

    Saulius

    Joined:
    Aug 10, 2010
    Posts:
    21
    Hi,

    I'm missing one feature. Shouldn't be a third option (for overflow) to auto resize (scale) rect according to text amount.

    upload_2014-9-12_11-18-59.png
     
  2. nbg_yalta

    nbg_yalta

    Joined:
    Oct 3, 2012
    Posts:
    378
    You can try to attach a Content Size Filter componnent to your text, it might help. Also text component has a property called "PreferredHeight" which is just the height of the overflowing text. So setting the height of the textbox to the preferred height should do the trick...
     
    Last edited: Sep 28, 2014