1. Architecture overview
| Component | Location | Technology | Responsibility |
|---|---|---|---|
| MYSYS22.DEn — engine | Assets/MySys22.DialogueEngine/ | C# (Unity 6) | reads the contract, executes graphs, exposes API/events |
| MYSYS22.DEd — editor | MySys22.DialogueEditor/ | Java 21 + JavaFX | writes lines/characters/variables, validates, performs deployment |
The system is structured into the following Unity assemblies:
| Assembly | Root namespace | Content |
|---|---|---|
MySys22.DialogueEngine.Runtime | MySys22.DialogueEngine | Core, Bridge, UI, Audio, API |
MySys22.DialogueEngine.Editor | MySys22.DialogueEngine.Editor | graph window, node view, inspector, validation, digest, AOT, scene setup |
The runtime depends on Unity.TextMeshPro, Unity.InputSystem, YamlDotNet, Unity.Burst, Unity.Collections, Unity.Jobs, Unity.Mathematics. The SIMD code is optional and always has a scalar fallback.
Project rule: no game logic is contained within the engine. The engine determines *when* a function must start and *what* must be done with the result; the manner in which a door is opened is instead determined by the game.
2. The on-disk contract
The root is unique: Assets/StreamingAssets/ (no wrapper folder).
| File / folder | Written by | Read by | Notes |
|---|---|---|---|
engine.manifest.json | Java editor | engine | project descriptor |
Graphs/<id>.graph.yaml | Graph Editor (Unity) or deployment | engine | graphs |
Graphs/manifest.txt | Unity menu / deployment | engine (mobile) | graph index |
Dialogue/<LINGUA>/<CID>.yaml | deployment | engine | line database |
Dialogue/<LINGUA>/manifest.txt | Unity menu / deployment | engine (mobile) | line index |
Characters/characters.list.yaml | deployment | engine | CID → displayed name |
Variables/variables.yaml | deployment | engine | variable declaration |
engine.graphdigest.json | engine (Unity menu) | Java editor | inventory for the writer |
The ownership of the data is partitioned as follows:
- The path of the dialogue (nodes, choices, functions) resides in the graphs and is therefore the
responsibility of the game designer.
- The text resides in the line database and is therefore the responsibility of the writer.
- The two domains communicate by means of the DID: the graph never contains text, but only numbers.
The legacy paths (Assets/StreamingAssets/MySys22.DialogueEngine/…, MySys22.DialogueAssets/…) are recognised and normalised by the engine; the Java deployment migrates the old folder if it detects it.