Question by
electricco20 · May 25, 2020 at 09:10 PM ·
uibuttonstextmeshrecttransform
Instantiating UI buttons relative to text above?
Hello,
Right now I am instantiating 1-2 buttons below a textmesh box, as seen in the attached screenshot. Currently, I have the Rect Transform Y position hardcoded. However, with this approach, I lose the proper spacing if the text above is taller than one line.
How can I instantiate the buttons 30 units below the last line of the text above, no matter how many lines it is?
Thanks in advance!
Comment
Your answer
Follow this Question
Related Questions
Problem with UI Buttons and Unity 5.3.2 0 Answers
Get the Rect property of a UI object inside a Canvas that has the HorizontalLayoutGroup Component 0 Answers
Set value of rect transform to eg Width / 2 0 Answers
Rect Transform limits vs position and size 1 Answer
Modify the inner UI elements of a button 0 Answers