Table Pro: When Your Data isn't a Game

Need to display data in a list or table format in Unity UI?


We think we offer the simplest and best-performing solution on the Asset Store to satisfy all your table rendering needs!

What sets us apart from other solutions is that all you need to do is attach our script to a RectTransform and use our simple API to populate your data. We’ll then render a completely style-able table for you in real-time and without any kludgy prefab requirements.

Check out just how simple our “Basic Usage” document here:
https://docs.google.com/document/d/1DO4cXgBbY76HCWjzqC169os8RzeDVcCu4Ruu12vPEP8

Or… view us directly on the Asset Store here (including several demos in both WebPlayer and WebGL formats):

Let us know what you think or if you find any issues! We’ve tried the other Unity UI Table solutions… and that’s why decided to write ours. We think it’s the best offering on the market and we hope you do too.

High-Level Features:

  • NO PREFABS! Our engine renders your data. Period.
  • Display multiple-line and dynamic height data rows.
  • Rows and columns automatically resize to fit your data.
  • Columns can contain either Text or Sprite cells.
  • Display dynamic column headers and footers that remain visible and also auto-size for your data.
  • Intelligently renders a minimal amount of actual UI elements at any time. Never renders your entire dataset.

Release Notes 1.31 (2019.06.03)

  • BUG: Fixing issues in ScreensSpace Camera Canvas render
  • ENHANCEMENT: Adding and documenting new table event callbacks
  • ENHANCEMENT: Added shift+click multi-select mimicking Windows behavior

Release Notes 1.30 (2019.02.12)

  • BUG: Scrollbars now no longer have the unnecessary indentation
  • BUG: Now properly stopping coroutines via handle instead of by name

Release Notes 1.29 (2019.02.07)

  • BUG: Now properly using default text shader in modern Unity revs

Release Notes 1.28 (2019.01.21)

  • ENHANCEMENT: Auto scroll to rows performs much better on large datasets
  • ENHANCEMENT: 2019 code style update

Release Notes 1.27 (2018.10.30)

  • BUG: Input cell behavior adjusted on single-input rows
  • BUG: Performance increased on non-pixel-perfect canvas

Release Notes 1.26 (2018.07.03)

  • ENHANCEMENT: Setting RayCast interception properties only where needed
  • ENHANCEMENT: New ‘constant’ Multi-Select mode (no shift-key press req)
  • ENHANCEMENT: Unity Text will now use a default material
  • BUG: Multi-Cell-Selection can now properly deselect cells
  • BUG: Table animations now work properly on WebGL builds again

Release Notes 1.25 (2018.05.31)

  • ENHANCEMENT: Can now populate datum elements in secondary threads!
  • BUG: Scrollbars now inherit canvas scale factor properly

Release Notes 1.24 (2018.03.29)

  • BUG: TablePro now works with Unity >= 2017.3!
  • INFO: Minimum supported Unity rev increased from 5.5.0 to 5.5.5p2

Release Notes 1.23 (2018.01.04)

  • ENHANCEMENT: ‘long-tap’ event performance improvement [using invoke instead of Update()]
  • ENHANCEMENT: Now support cell deselect callbacks [Table.SetDeselected()]
  • ENHANCEMENT: Now support configurable multi-select key (control/shift)
  • BUG: Fixed rare issue with TMPro Input Cell positioning
  • BUG: Changed Row click handler to trigger Cell-level clicks in all cases

Release Notes 1.22 (2017.10.25):

  • ENHANCEMENT: Now support a ‘long-tap’ event on cells.
  • ENHANCEMENT: Now support selection modes: MULTICELL and MULTIROW
  • ENHANCEMENT: Globally applied uncrustify code style
  • BUG: Fixed rare issue related to alpha colors and header cells
  • BUG: Input cells now reset properly when the table is redrawn in change handler
  • BUG: Input cells now position properly in 2017.1

Release Notes 1.21 (2017.07.05):

  • ENHANCEMENT: added ability to disable row hover colors
  • BUG: Input cells + programmatically animated scrolling now work together

Release Notes 1.20 (2017.04.20):

  • ENHANCEMENT: now supports TextMeshPro text! (TextMesh Pro | Beta Projects | Unity Asset Store or Pro version >= 1.0.55.56.0b8)
  • ENHANCEMENT: added UID based indexof method on datum object
  • ENHANCEMENT: can now define scrollbar ‘thumb’ size
  • ENHANCEMENT: new can define default font and style for all tables in Singleton
  • BUG: Patched vertical row spacing issue
  • BUG: TablePro will now throw a WARNING when StartRenderEngine called on an inactive table
  • BUG: Fixes for row selection hover issues
  • BUG: Fixed rare error when rendering header cells

Release Notes 1.19 (2017.02.10):

  • BUG: Correcting rare issues around multi-line data in single-row tables
  • BUG: Correcting issues with using keyboard nav with input field heavy tables

Release Notes 1.18 (2017.01.13):

  • ENHANCEMENT: now support adding integer elements directly (no stringing needed)

ReleaseNotes 1.17 (2016.12.23):

  • BUG: Fixed issue with scrollbar visibility in Unity5.5+

Release Notes 1.16 (2016.12.19):

  • BUG: Correct gizmo display for ScreenSpaceOverlay/Camera
  • BUG: Setting transform parent properly on input widget
  • ENHANCEMENT: Rows now have a definable “NormalAltColor”

Release Notes 1.15 (2016.10.19):

  • BUG: Will now color rows properly on mouse-over on touch devices
  • BUG: Will handle resize when set to force 100% width

Release Notes 1.14 (2016.10.19):

  • BUG: Fixed issue with table redrawing in draggable parent rect
  • BUG: Fixed issue applying table formatting after a redraw
  • ENHANCEMENT: Code Formatting Updates

Release Notes 1.13 (2016.10.13):

  • ENHANCEMENT: Multiple bug fixes and enhancements per awesome user feedback!

Release Notes 1.12 (2016.09.19):

  • BUG: Corrected cell coloring issue when deactivating and activating a table
  • ENHANCEMENT: Will now auto-scroll when using the MoveSelectionUp/MoveSelectionDown methods
  • ENHANCEMENT: Added new"GeneralSettings" called “TableSelectionUIMode” this can be used to disable cell-level UI highlighting on interaction
1 Like

What is the drawcall for table like this?

The table in the gif is about the toughest case and it’s 19 draws.

That’s abit high. So it is animated? Since u are drawing them manually, I suppose you can batch them, no?

It runs ok on an iPad2 as is, but you make a good point. We’ll look into optimizing that bit and I’ll post back when it’s better. Thanks for the input!

Is it possible to use buttons in the table in some way ?

Right now we’ve got callbacks on click of rows and individual column headers (to facilitate custom sort implementations). The row’s themselves render mouse hover/down/selected states… so they behave kind of like buttons but we aren’t using the actual button script on them. So… not sure if that’s what you are asking about with regard to buttons, but yes, the table is fully mouse-interactable liked you’d expect.

Still looking into this, but it appears the general consensus on this is that this is just the nature of the new Unity UI. There’s no way to NOT create at least two draw calls per mask and Unity text pretty much doesn’t batch at all so the Unity UI gets to a mid-teens level of draw calls pretty quickly as soon as you get any sort of non-trivial UI layout in play.

It doesn’t appear there’s any obvious quick hit to reduce draw calls as that’s just the limitation of thew new Unity UI… the new Unity UI sure doesn’t compete with NGUI at all when looking purely at draw call optimization. :slight_smile:

1 Like

On a whim, I grabbed the beta release of Unity 5.2.0f1.

Swapping all my Mask elements for the new RectMask2D object that’s added in 5.2.0 makes the scene ‘only’ take 15 draws now. So… that’s a bit better. I’ll make sure I add that into the next release so if you are using 5.2.0 (when it comes out) it’ll use the newer mask method.

Quick update… we did manage to find some areas where we were able to remove some UI element overlaying and trim off some drawcalls. The test scene above now runs with 13 draw calls in Unity 5.0-5.1 (and fewer in 5.2 with the new masking enabled). This performance improvement will be included in our next update.

1 Like

This is pretty great. It’s helped a lot so far.

One issue:

  • the reset() method doesn’t really, and leaves the table in a sorta weird state. So you can’t reuse the same table to show different data (things like renaming headers or changing the # of columns does not work).

A few requests, in order of preference:

  • I’d really like to be able to disable horizontal scrolling, and have the text labels expand to wrap to 1+ lines.
  • Since you’re not using buttons, we don’t get keyboard/controller navigation for free from the event system. I was able to write my own, but this makes the selection callback useless (there’s no way I can see to highlight a row, only select it)
  • Finally, I don’t have a need for this now, but it would be useful to be able to supply something other that a string or an image for a cell.

Thanks for the feedback!

Regarding the reset() issues, that’s actually fixed in version 1.3 (or should be) and has already been submitted to Unity for approval (yesterday). Should hit the store early next week. Please definitely hit us up once 1.3 hits if you still have issues with that.

Regarding request one, if I’m understanding correctly, you should be able to click the Restrict 100% Width Max toggle under the inspector “General” settings. Let us know if that doesn’t provide the feature as you describe.

And finally, regarding your event and custom game objects requests… sound like reasonable ideas and we’ll put them on the list. The keyboard nav actually may be sooner than later so we’ll ping back here with an update when available.

Excellent, thanks! I’ll definitely be looking forward to 1.3 (and beyond).

Yes, the Restrict 100% Width Max setting was what I wanted. Only… I do seem to be having trouble with it. My table’s width is 795. But all the rows are 100 px wider – I’ve dug in a little bit & gotten as far as seeing that the table’s (hidden) tableRect property’s width is 895, but I’m still trying to figure out why.

Oh man, you’re not going to believe this, but that exact bug is also fixed in 1.3 as well. :slight_smile:

1 Like

Version 1.3 just hit the Asset Store finally:

Thanks for the update! It did fix my second issue (I reworked my setup so it creates new tables each time, so I haven’t tested the reset() change).

I have 2 new bugs to report, though:

  1. the calculation for the minimum height of the table is off; it doesn’t take into account the minimum row size. I don’t know if this is the best place for it, but I changed Datum.cs:186 to:
if (this._measuredHeight.Value > this.table.minRowHeight) return this._measuredHeight.Value;
else return this.table.minRowHeight;
  1. This was present in the last version, but I held off reporting it in case it was already fixed. Sometimes, when creating a table with one column & no headers, the table will be laid out & then immediately disappear. I’m really not sure what’s causing this, though digging through the hierarchy I can still see the rows and everything looks right. The text just isn’t visible.
1 Like

I think you are spot on regarding the minRowHeight logic and incorporated your fix in the trunk code. I’ll run it through some more tests but I think you squished a legitimate bug there. Thanks!

Regarding the disappearing table you mention in #2… I’m not able to duplicate that one but I’ll keep poking at it. Is there any other info you can provide to help me reproduce that one on my side? Is the table on a screen space overlay canvas or one of the other variants? Anything particularly odd that you can think of? Definitely sounds like a nasty bug and I want to get it corrected.

Sorry, I had company this week so wasn’t able to look into this until today.

I’ve gone to the trouble of creating 2 identical tables, one with headers & one without, and the first one displays fine while the second flashes & then disappears. But going back & forth through the hierarchy & comparing them, they’re virtually identical (the Body’s top position is slightly lower on the one w/the header). But everything’s there in the one that’s broken – if I dig down to the “0Text” component, I can see that the text is still there. And if I disable the mask on the Body object, everything becomes visible. So it’s gotta be something going wrong with the Image Mask, but that’s about all I’ve been able to figure out so far.

Thanks for your work on this man. I’m planning to sink some TablePro time in this week and will do my very best to try and duplicate/fix this issue.

1 Like

error:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[SLS.Widgets.Table.Column].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
SLS.Widgets.Table.MeasureMaster.doMeasure (SLS.Widgets.Table.Datum d) (at Assets/SLS/Widgets/Table/MeasureMaster.cs:24)
SLS.Widgets.Table.Row.refresh () (at Assets/SLS/Widgets/Table/Row.cs:105)
SLS.Widgets.Table.Datum.set_isDirty (Boolean value) (at Assets/SLS/Widgets/Table/Datum.cs:103)
SLS.Widgets.Table.Element.set_value (System.String value) (at Assets/SLS/Widgets/Table/Datum.cs:19)
SLS.Widgets.Table.Element…ctor (SLS.Widgets.Table.Datum d, System.String value) (at Assets/SLS/Widgets/Table/Datum.cs:37)
SLS.Widgets.Table.DatumElementList.Add () (at Assets/SLS/Widgets/Table/Datum.cs:253)
SLS.Widgets.Table.Table.addTextColumn (System.String header, System.String footer, Single minWidth, Single maxWidth) (at Assets/SLS/Widgets/Table/Table.cs:183)
showTable.reFlash () (at Assets/scene_Start/showTable.cs:54)
UnityEngine.GameObject:SendMessage(String)
loadJson:On_Click() (at Assets/scene_Start/loadJson.cs:29)
UnityEngine.EventSystems.EventSystem:Update()

I am a beginner…