Skip to content

Data Table

Actions for adding, editing, sorting, saving, and reading rows in Data Tables.

Most Data Table actions now use a DataTableSource parameter block to resolve the table they work on. Set Source, then assign the matching field that appears for a DataTable, DataTableAsset, or DataTableComponent.

Getting A DataTable

Use these actions to get a DataTable from a component or asset:

GameObject Get DataTable

Find a DataTableComponent on a GameObject and get its table.

DataTable Component Get DataTable

Get a table from an existing DataTableComponent.

DataTable Asset Get DataTable

Get a table from a DataTableAsset.

You can also create a local DataTable variable in your FSM and select it through DataTableSource.

Data Table Actions

Add Record

Add a DataRecord as a new row.

Add Row

Add an empty row to the table.

Add Records

Add multiple rows from DataRecords or DataComponents.

Clear

Clear all rows from the table.

Check Is Empty

Check whether the table has zero rows.

Filter Rows

Keep or remove rows based on a condition test.

Find Row

Find the first row matching conditions.

Find Best Row

Find the best-matching row based on scoring criteria.

Get Cell Value

Get the value of a specific cell.

Get Count

Get the current row count.

Get Record

Get a full DataRecord from a row.

Get Random Record

Get a random row from the table.

Get Row Values

Get row values into output variables.

Load

Load table data from storage.

Remove Row

Remove a row by index.

Save

Save table data to storage.

Set Cell Value

Set the value of a specific cell.

Set Row Values

Set multiple values on a row.

Sort

Sort rows by one or more fields.

Trim

Trim rows to remove unused capacity or empty entries.

Debugging

You can inspect the resolved Data Table in the Unity Inspector while your FSM runs, whether it comes from an asset-backed table or a component-backed table. The table view updates as rows are added, removed, sorted, or edited, so you can verify data changes in real time.

See also