UGTK / Toolkit / Ui Module / Dashboard System Completed
Dashboard System
Summary
The Dashboard System displays server data as a table or as a list, without a class per schema. A row
is a bag of name/value pairs, so the same UI renders any table the endpoint returns: change the query on
the server and the dashboard follows, with no code to touch in Unity.
It is the back-office view of an advergame or of a kiosk: leads collected, scores, sessions, whatever the PHP side exposes.
Content
Modules Dependencies
- Php Connection System: the download is a
Mn_PhpOperationBaseoperation, with its loop, loading screen and outcome events. - Database System: the rows land in a
SO_SimpleDatabase, which decouples the request from the view. - Layout Auto Resize and Pooling System: the list grows and reuses its rows instead of instantiating.
Setup
- Add
Mn_PhpDownloadTableToRowsDatabaseand point it at the endpoint and the table. - Assign the
SO_TableRowsDatabaseasset it will fill. - Add
Mn_Dashboardwith the view you need —Mn_DashboardTableRowsfor a table,Mn_DashboardStringListfor a plain list — and give it the same database. - Assign the row prefab (
Mn_TableRowHolderorMn_StringHolder).
How To Use
S_TableRow row = ...;
string name = row.Get("name"); // "" if the column is missing
string score = row.Get("score", "0"); // explicit fallback
bool hasIt = row.Has("email");
row.Set("status", "sent");
Good to know:
- Every value is a string. Parse on read with
int.TryParse/float.TryParse; nothing converts for you, and a numeric column sorts alphabetically unless you parse it first. Getnever throws: a missing column returns the fallback. Convenient, but it also means a typo in a column name shows up as an empty cell rather than as an error — check withHaswhile wiring things up.Initialize()must run before the lookups: it is what builds the name→value index. Rows arriving from the download are already initialized; rows you build by hand are not.- Rows are pooled: do not keep a reference to a holder across a refresh, it will be showing another row.
- The
tablefield scopes the row, so one database can hold several tables at once. Filter by it if you download more than one. - A large table is a large request: the whole thing arrives in one response and is parsed in one frame. Paginate on the PHP side rather than downloading thousands of rows.
Testing Scene
Open DashboardScene in the module's Debug/ folder.
What to do, in order:
- Fill the list with generated rows from the inspector and scroll it.
- Fill it with zero rows.
- Include one very long entry.
- Point the dashboard's item prefab and the pooler's prefab at different objects.
Step 2 is a legitimate outcome that has to show something rather than a blank panel. Step 4 is the setup that silently produces an empty dashboard: the pooler instantiates its own prefab, not the dashboard's, and nothing complains. The inspector detects the mismatch and offers to reconcile it.
The recording is step 1 and step 2 back to back. Select Dashboard, and in Editor Test Tools
set Rows and press Fill: twenty generated rows arrive, scroll like real ones, and let you
judge spacing and truncation before a server is involved. Clear empties it, which is the case
step 2 is about - an empty list is a normal outcome and has to show something rather than a blank
panel.
Technical Info
| Path | Content |
|---|---|
Scripts/Data/S_TableRow.cs |
The row: name/value pairs, Initialize, Has, Get, Set, equality by content |
Scripts/Data/SO_TableRowsDatabase.cs |
The database of downloaded rows |
Scripts/Data/SO_StringListDatabase.cs |
The database for the simple list view |
Scripts/Php/Mn_PhpDownloadTableToRowsDatabase.cs |
The download operation that fills the database |
Scripts/Core/Mn_Dashboard.cs, Mn_DashboardElementHolder.cs |
Base of the views and of the row holders |
Scripts/TableRows/Mn_DashboardTableRows.cs, Mn_TableRowHolder.cs |
Table view and its row |
Scripts/StringList/Mn_DashboardStringList.cs, Mn_StringHolder.cs |
List view and its row |
© 2026 Marcello De Bonis. All rights reserved
Depends on 6
Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 13 modules in total.
UGTKengine within an engine


