3. Initial configuration procedure
The following procedure produces a working dialogue consisting of a line associated with a character.
- In Unity, open the window
MySys22 ▸ Dialogue ▸ Dialogue Graph Editor.
- On the canvas, select with the right button
Add Dialogue Nodeand specify the fieldsSpeaker
(identifier of the character), Start DID and End DID.
- Select the node, open the context menu and choose
Set as Start Node; the node concerned is
highlighted with a green border.
- Save the graph with
File ▸ Save. The file is written toAssets/StreamingAssets/Graphs.
- In the Java editor, select
New Projectand specify name, language and path of the Unity
project.
- Open the lines tab, insert the rows with identifier
LIDcorresponding to theDIDdefined in
the graph, then draft the texts.
- Select the button
Injectto transfer the content to the Unity project.
- In Unity, add the
GameSetupcomponent to the scene, or useSetup Scene, and start playback:
the dialogue is presented on screen.
If [317] No dialogue graph found is signalled in the Console, the configured graph has not been located: set the field Graph of the GameSetup component to the desired graph and verify that the corresponding file is present in Assets/StreamingAssets/Graphs.
4. Data structure on disk
4.1 Runtime contract (Unity project)
The engine reads the dialogue data from the Assets/StreamingAssets folder:
Assets/StreamingAssets/
├── engine.manifest.json project descriptor
├── engine.graphdigest.json list of the DID used by the game
├── Graphs/
│ ├── <grafo>.graph.yaml dialogue graphs
│ └── manifest.txt index of the graphs
├── Dialogue/
│ └── <LINGUA>/
│ ├── <CID>.yaml lines of a character
│ └── manifest.txt index of the line files
├── Characters/
│ └── characters.list.yaml identifiers and names of the characters
└── Variables/
└── variables.yaml variables used by the conditions
4.2 Writing project (Java editor)
The editor stores the content in a dedicated project folder, defined at creation time. The structure comprises the file .project.yaml, the databases lines/<LINGUA>/<CID>.yaml, the folders Characters and variables, and the digest imported from the engine.
The deploy operation copies and normalizes such content into the Assets/StreamingAssets folder, without requiring the intervention of Unity.