Answer the question
In order to leave comments, you need to log in
How to dynamically resize UI?
Hello everyone
, I'm making a dialog system, and the following problem arose:
there is a ui that displays dialog options \ phrases - nodes. I display these nodes through the grid layout group. The UI has an arrow. the player can move this arrow and depending on its position this or that text will be displayed (and this or that choice will be made)
the question is how to make this UI change its size depending on the number of nodes that should be displayed on the screen
I don’t want to make crutches like look at the number of nodes displayed, then, based on this number, set the size of the UI, place elements sequentially there, etc. - in general, write tons of codes. Is there any standard way to do this?
(for example, the Best Fit property of the text, with the help of which unity itself determines the desired text size on a limited
UI , depending on the number of characters)
with which the player will choose dialogue options?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question