Skip to content

The Unity plugin

The TaleShard Unity plugin โ€” what it does, how a story reaches your scene, and how to extend what it generates.

All documentation
On this page

This is the documentation for the TaleShard Unity plugin โ€” the code that reads a synced project inside a Unity game. TaleShard turns a narrative project into three files and some C#. Your game reads them; it never parses a story, and it never learns a node-type table.

The editor those files come out of is a different product with its own manual: the TaleShard app.

Three ways in, depending on what you are holding.

Iโ€™m a Unity developer, integrating this for the first time. Read what the plugin does, then play your first story. Both are short. After that the playing a story track is the one you will live in.

I want to change what gets generated. Read the two seams first โ€” which assembly your code belongs in decides most of the rest โ€” and then the extending track.

I need the exact members of a type. The reference track is every public surface, one page per subject โ€” the play loop, a step, saving, media, the Unity player, scripting, diagnostics, drawing text, colour, UI strings and the generated entity data. It is written to be dipped into rather than read through.

I want to know what a sync actually wrote into my project. What a sync generates to start from is the wiring โ€” GameBootstrapper, GameData and the two components โ€” and the generated constants and stores is everything your game code types instead of a string literal.

I want to know how it holds together. The three files, node meaning is resolved once and expressions ship as trees are the whole mental model, and they are worth reading once even if you never write a generator.

I need to tell the writer something. What a build needs from a project is the short list of authoring decisions that reach a compiler โ€” codes that become C# names, the command kind that fails a build, and the start nothing will guess.

Commands are the one thing that sits on both sides of that line. A command is declared in the editor and arrives as a method in your code, so what a writer chooses decides what your game must honour. Declaring one is the appโ€™s page; receiving one is implementing commands.

Which version this describes

These pages describe the current plugin, not a released version โ€” there has not been one yet, so there is nothing to be older than. The version an integrator can always read off their own project is the one stamped into the header of every generated file.

Written for
Unity developers ยท Advanced integrators
Last updated