|Attention||Topic was automatically imported from the old Question2Answer platform.|
For the tool I am building, I have to change the font size of a rich text label (it has to be rich text) through code. However, fit content height breaks when I do this. I looked it up and this is a known issue with the engine. If anybody knows a way to fix it or a good alternative it would be appreciated.
How is the height broken, exactly? Could you give an example?
Ertain | 2021-08-14 00:45
It acts like it’s the size of the original font. It doesn’t matter though. All you have to do is set the text to nothing, wait two frames, and set it back to what it was
Cogan | 2021-08-14 00:53
Hmm I think I’ve encountered something in this realm before. Try using
set_deferred() to change the text and see if that fixes your issue.
EDIT: if possible try setting the node invisible, then set the text, then
set_deferred() the node back visible. That was roughly my solution when I had an issue scaling control nodes.
timothybrentwood | 2021-08-14 01:34