Dynamic UI image scale with Text length?
Hey guys im having trouble with this and some people say about content size filter etc but im not sure if it can help me as ive tried using it..
ill attach a couple of images to show my problem and wonder if anyone can help
the blue background is the parent and the text is the child
is there anyway without code that i could use unity's UI system to help with this?
i want to dynamically adjust the width of the blue background to fit the text ... if theres only 1 number itl be small if theres 6 stretch the width of the ui to match
untitled-1.png
(12.3 kB)
Comment
You'd need to create a script that looks for the width of each image you add. Then add that with the previous images width, then set that as your dynamic adjusted width for the entire background.