What a sync writes
Every file a sync produces, which of them land in your Unity project, which ship in a build, and what belongs in version control.
All documentation β The plugin and sync
Start here
Concepts
Authoring for a game
Playing a story
The generated code
The plugin and sync
On this page
A sync runs in two stages, and they leave files in two different places. Knowing which is which answers most of the questions that come up afterwards β what to commit, what to ignore, what is safe to delete, and what a teammate needs on their machine.
Stage one β the sync output directory
TaleShardSync writes a directory of its own, under your system temp folder. You never need to
open it, and nothing in it belongs in your project. It is listed here because the sync report
names these files, and because a diagnostic that mentions one is easier to read if you know what it
is.
| File | What it is |
|---|---|
runtime.json | The resolved story β every board, node, field value and expression. This is what your game plays from. |
codegen.json | The resolved declarations β entity definitions, traits, option sets, variables, commands, tables, media, tags and every translation. This is what the code generator builds your C# types from. |
manifest.json | The projectβs name, slug and export-format version. |
media-map.json | Filename to media id, for the files in media/. |
media/ | The media files themselves, in the folder layout the editor shows. |
sync-result.json | The runβs own report: what changed, what was downloaded, what was skipped. |
board-delta.json | Only on a board-only sync β what changed in that pass. |
The directory is rebuilt from scratch on every sync, so nothing in it survives and nothing in it is worth editing.
Stage two β what lands in your project
The generator runs over that directory and the plugin copies the result into Assets/. This is the
half you version-control.
| Path | What it is | Regenerated |
|---|---|---|
Assets/Scripts/TaleShard/ | Your generated C# β entity classes, option sets, variables, command hooks, board and node-type constants, the localization registry. | Every sync |
Assets/Resources/Data/ | Entity data, one file per definition, plus Runtime.json β the runtime payload, shipped as a resource so a build can load it. | Every sync |
Assets/Editor/Plugins/TaleShard/ | The pluginβs own editor scripts, and the sync tool binary. | On deploy, not on sync |
Assets/Editor/Plugins/TaleShard/SyncState/ | Per-machine sync state β the cached document, the replication cursor and the manifest of what the last run generated. | Every sync |
What ships in a build
Assets/Resources/Data/Runtime.json is the runtime payload, and it ships: the game reads it at play
time. Everything else under Resources/Data/ ships with it.
codegen.json never ships. It is an input to code generation and stays in the temp directory β
there is nothing to exclude, because it never reaches your project in the first place.
What to commit
Commit the generated C# and the data. They are build inputs like any other source: a teammate who clones the project should be able to compile and play without running a sync first, and a build machine should never need an API key.
Two things follow from that, and they surprise people:
- A generated file is overwritten, never merged. Never hand-edit one β see the three files for the single deliberate exception. If two people sync at different times you will see diffs in generated code; that is expected, and the generator is deterministic, so the same project always produces the same bytes.
SyncState/is per-machine. It holds a replication cursor and a cached copy of the document. Committing it is harmless but pointless, and a stale one on someone elseβs machine simply causes one full sync. The sync tool binary itself is gitignored deliberately β each developer downloads the one for their own platform.
When something looks wrong
The sync report names what it could not do rather than failing silently, and both payloads carry
their own diagnostics which the generator replays into the Unity console. A file that is missing
from Assets/ after a sync has almost always been reported β read the console before re-running.
Two failures are refusals rather than bugs, and both name their own fix:
- A payload the plugin does not understand. The sync tool and the plugin scripts come from one release; if you update one without the other, the reader refuses the file rather than generating half a project from it.
- An input that is not a sync output directory. The plugin reads the directory
TaleShardSyncwrites. An export ZIP downloaded from the editor is a different thing and is refused by name.