Get width of uGUI text object

I am working on a project that uses a canvas with uGUI Text objects. The goal is to have these Text objects instantiated and appended side-by-side, and in order to do that, I am trying to get the width of each actual object.

The main issue is that I am unable to get the actual width of the uGUI Text object; instead, I get the width of the prefab used to instantiate the object. Does anyone know how to access the adjusted/wrapped mesh of each Text object? Otherwise, is there a better solution to this problem?

Take a look at the Horizontal Layout Group component, it will place each children one after the other automatically.

If your prefab is a Text it’ll work automatically, but if the Text is a child of some other object of the prefab you need to resize the object to fit it’s content. Check this link: Redirect to... title of new-page