Resizable Text Bubble

I was wondering how can I detect the area required to display a X amount of text, and resize a speech bubble in code, so whenever I need to display text, the speech bubble will automatically resize.

If you are using a Unity UI text element for the speech text, you can use a content size fitter to make it the appropriate size.

See the documentation here: Redirect to... title of new-page