Tables in TMP

I want to create a table (made of rows and columns) in Text or TMP. I know simple Text in Unity does not support it, wondering if I could create that with TMP.

Are those supported in latest version of TextMesh Pro?
If not, is there any alternative way of creating (text) tables in Unity?

Please guide. Thanks in advance.

Tables are not supported in TMP.

Tables are pretty complex and typically made up of multiple text objects / labels each with their own potential width, height and alignment. As such, I would suggest creating said table using UI Layout components which themselves contain those text objects.

If you needed any of this to be dynamic in the sense of the structure of those tables being contained in the body of the text, then you would need to implement some text parser to extract that information in order to create the layout of objects to represent this table.

Someday, when I have time creating some type of Table component might be nice.

I agree that a full table component would be complex. But most game needs for text tables would be satisfied with something like the MS-Word paragraph indent that sets the left margin. One approach might be a good-till-cancelled option on that would move the left margin until the next . This would make it possible to build simple term-definition tables.

1 Like