hi hi!!
I'm building a game that displays a lot of text boxes.
How can I make it so that when I create the text boxes, the system detects how many characters are in the text box, changes the size of the text box according to the number of characters and lines there are, and creates a background for the box in a size that matches the created text box?
I create a text cube and in it is written:
"HELLO
BOB"
I want to create something that will check what is in a text box:
1- How many lines are there? (2 In our case)
2- What is the length of the line that has the most characters (in our case, line 1, which has 5 characters compared to line 2, which only has 3 characters)
Now that I have this information I want the text cube to change its dimensions to the size of the row that has the most characters, and to the height that contains the number of rows.
After that I want and creates a background for the box in a size that matches the new size of text box
how do I do it?
Here's an example of what I'm trying to achieve (pictures taken from a game called Lil' Guardsman)
I thank you from the bottom of my heart