Copyright © 2025-2026 Candy ArtsTesting Dialogues
Testing a Dialogue takes a scene that loads it and runs it. Candy Dialogue Engine ships with one, and your own scenes can serve as well.
The Testing Scene
The provided testing scene is Testing_Scene.tscn, in Candy_DE/Scenes/Testing_Scenes. When it starts, it loads a Dialogue and runs it in the default Dialogue UI (the candy_ui autoload). It also contains three buttons, which suspend, resume and interrupt the Dialogue.
Which Dialogue it runs, and where that Dialogue starts, is set on its root node, in the Inspector:
| Variable | Value |
| dialogue | The Dialogue file to load, without its .txt extension. |
| conversation | The Conversation to start in. |
| block | The Block to start in. |
| line | The Line to start at: its index, or the Reference of a Line Mark. |
- From the Godot Editor: open the scene, set the four variables in the Inspector, and run the current scene.
- From the Wizard's Test tool: choose the testing scene, the Dialogue, and the Conversation, Block and Line to start at, then run the test. The scene file isn't modified.
- From Candy Dialogue Creator: its Test button exports the Dialogue being written, and the Godot Editor runs it in the testing scene chosen in the Wizard's Test tool or in the Creator. Your project must be open in the Godot Editor, with the Candy Wizard enabled. See the Candy Dialogue Creator documentation.
- Duplicate Testing_Scene.tscn under a new name, in the same folder, or attach Testing_Scene.gd to the root node of a scene of your own.
- Add the nodes the Dialogue needs: characters, cameras, markers, lights...
- If the Dialogue should run in another Engine than the default Dialogue UI, replace candy_ui in the script with that Engine's node.
- Be saved in the testing scenes folder: testing_scenes_folder in Candy_Properties.gd, which is Candy_DE/Scenes/Testing_Scenes by default.
- Have a root node whose script exports the four variables above (dialogue, conversation, block and line), as Testing_Scene.gd does. The tools write what to run into them.
func _ready() -> void:
candy_ui.load_scripted_dialogue("test_dialogue")
candy_ui.start_dialogue("Conversation_1", "Block_1", 0)