[Beginner] [UI text] Adapt the size of the text zone to the text inside
Hello the community !
Well I create an image to explain what i try to do :
I find a lot about content size fitter and Horizontal layout group but it's not work. I work on a script to change the size manually with the number character of the text but maybe he exists a better solution with the unity tools ?
Thx for all readers
Answer by Soraphis · Apr 21, 2016 at 11:49 AM
its not that hard:
add a panel http://imgur.com/7UVyBcl
scale the width of the panel as you favor http://imgur.com/7UVyBcl
add the components like here: http://imgur.com/7UVyBcl
use the bottom middle anchor preset with shift and alt pressed http://imgur.com/pUE3eil
add a child "text" gameobject and fill it with your text
Answer by Ekmule · Apr 26, 2016 at 12:24 PM
Thx Soraphis,
Sorry for the late answer.
I try it a first time but doesn't work. But I think it's the good path.
Your answer
Follow this Question
Related Questions
Prevent expandable object from shrinking 1 Answer
how do i change max size value of text component unity? 1 Answer
UI TEXT not showing up in game mode 1 Answer
GameObject destroyed when changing scene 1 Answer
uGUI Text draw calls 1 Answer