30 May 2020

TableUI Unity asset

A simple UI element that allows you to create a table in Unity

In this post I'll be talking about a little project that I've recently made in Unity. It is a new UI component that allows you to create a simple table with some simple options for configuration. This project was born because I was in the need of a table UI for another project that I am developing. And looking in the asset store for solutions I noticed that there are no free assets that could help me. There were some paid solutions that could help me but I decided to make a simple asset and also learn about making a custom inspector in Unity.

In the result product I managed to create a table with very few configuration options but that I hope to be improving over time. As of today you can dinamically change the number of rows and columns, customize a header, the borders, colors and style.

Of course there are some features that it lacks and could be interesting to implement, and that I intend to do. The main drawback is that you can't change the column width individually, meaning that all columns must have the same width, also all the cells are text, meaning that right now you cant put a button or a checkbox in a cell. Also you can't nest different levels of headers.

The way the component is made is quite simple. It reuses the default Unity UI elements like panels and text componets and combines them in such a way that a table structure is made. You can see all the code if you download the package.

Click Here to download the project documentation