I have set Gui Text Line Break, and I want to increase the size of the Box when the text goes to the next line.
(Example: Text height is 10, and if you move to the next line, y value of Box Size increases by 10)
local text_node = gui.get_node("my_text_node")
local box_node = gui.get_node("my_box_node")
local text_metrics = gui.get_text_metrics_from_node(text_node)
local box_size = vmath.vector3(text_metrics.width, text_metrics.height)
gui.set_size(box_node, box_size)
You may also want to take into account any 9-slice values on the box node, using gui.get_slice9(box_node).