---
title: "Data Tables - s&box library"
description: "A prototype inspired by Data Tables from Unreal Engine"
canonical: "https://sbox.watch/libraries/tzainten/datatables/"
generated_at: "2026-07-23T00:21:23.191Z"
---

# Data Tables

A prototype inspired by Data Tables from Unreal Engine

- Type: library
- Ident: tzainten.datatables
- Creator: tzainten
- Canonical: https://sbox.watch/libraries/tzainten/datatables/
- Markdown: https://sbox.watch/libraries/tzainten/datatables.md
- sbox.game: https://sbox.game/tzainten/datatables/
- Generated: 2026-07-23T00:21:23.191Z

## Stats

- 24h momentum: +0
- Terry score: 65%
- Favorites: 4
- Upvotes: 9
- Downvotes: 1
- Updated: Jan 13, 2025
- Created: Dec 18, 2024
- Size: 107.7 KB
- Files: 30
- Tags: 

## Description

How to Use
Data Tables provides you with a custom resource type that holds a list of data entries. You can then easily query data from this resource in C\#.

You define your Data Structure in C\# like so:
public class ExampleStruct : RowStruct
{
 public string Text { get; set; }

 public Dictionary<string, SoundEvent> Sounds { get; set; }

 public List<string> Strings { get; set; }
}And then query data from a Data Table like this:
ExampleStruct Struct = Table.Get<ExampleStruct>( "NewEntry\_0" );
Log.Info( Struct.Text );

When you make a change to your Data Table, those changes will be reflected in-game immediately after you save the file.

Custom Attributes
The \[JsonTypeAnnotate\] attribute will tell the serializer to also store this property's type, allowing for this property to be properly deserialized later.

Combining the above attribute with the \[Instanced\] attribute provides you with a dropdown in the editor. You can now select any class that inherits from the property's type.
public class BaseClass {}

public class A : BaseClass
{
 public int Integer { get; set; }
}

public class B : BaseClass
{
 public bool Boolean { get; set; }
}

public class ExampleStruct : RowStruct
{
 \[JsonTypeAnnotate, Instanced\]
 public List<BaseClass> List;
}

Report Issues
If you encounter a bug or you want something added, your options are:
- Submit a Bug Report / Feature Request right here on sbox.game
- Submit an issue @ https://github.com/tzainten/DataTables/issues
- I'm in the s&box Discord @tzainten



## More by tzainten

| Package | Ident | Players | Favorites | Upvotes | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Vivid Panels | tzainten.vividpanels | 0 | 0 | 0 | -- | https://sbox.watch/libraries/tzainten/vividpanels.md |
