Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | stoff |
Hi everybody!
What is the best way to get the Height of a RichTextLabel, after appending a text?
I tried this so far:
extends RichTextLabel
func _ready():
fit_content_height = true
bbcode_enabled = true
rect_min_size.x = 50
append_bbcode("Lorem ipsum dolor sit amet, consetetur sadipscing...")
print(get_rect())
#this prints: (0, 0, 40, 40) which is the default size of the label before appending any text
print(get_content_height())
#this prints: a seemingly random number? (scary...)