BBText.Width() function does not work properly anymore

Since GDevelop’s latest update 5.5.230, BBText objects’ actual width is not returned when using the expression [bbtext_object].Width(), instead their initial width set in the editor is returned.

It was very useful to put the text inside a bubble of just the right size.

1 Like

Try checking whether the “Word Wrapping” parameter value of your BBText object is set to “Yes”. I think what happened is that the update has set to “Yes” the word wrapping setting by default without mentionning it anywhere in the release log. It did break some text boxes for me but now it’s working again (I needed it to “No” for some, so it changed without telling me).

I think they should edit the update release log and mention it somewhere, especially since you can’t even see the default value of the parameter from the object editor.

Hey yes that was it, thank you!!
They should indeed mention it next time.

Anyway have a nice day :raised_hands:

1 Like

BBText now works the same as the Text object:

  • if there is a custom size set to the instance, the text is wrapped
  • if there is no custom size, the text is not wrapped