Testing and debugging
Testing in Opal is fast because Play mode runs the game inside the editor. Use short edit-test loops: change one thing, play it, inspect what happened, then adjust.
Play modes
| Control | Use |
|---|---|
| Play in viewport | Fast iteration while keeping editor context nearby |
| Fullscreen play | Test framing, mobile-like focus, and player experience |
| Stop | Return to editing |
| Stats | Check runtime performance and debug values |
| Flow overlay | Watch graph nodes fire while the game runs |
Play mode runs input, physics, flow graphs, animation, components, audio, and scene changes.
Start scene testing
By default, play starts from the project's start scene. This is correct for testing the complete game flow.
When debugging one scene:
- Temporarily set it as the start scene, or use scene-specific test controls where available.
- Keep initialization logic in Scene Flow so tests behave like the real game.
- Restore the real start scene before publishing.
Flow overlay
The Flow overlay shows graph activity while playing. Use it when:
- A tap does nothing.
- A branch takes the wrong path.
- A timer fires too often or not at all.
- A custom event is emitted but no listener responds.
- A component action runs on the wrong object.
If a node does not light up, the event or previous wire did not reach it. If it lights up but the result is wrong, inspect the node fields, expressions, or target object.
Problems panel
The Problems panel lists validation warnings where available.
Common warnings include:
- Missing asset references
- Invalid graph connections
- Broken prefab or component data
- Missing target scene
- Duplicate scene names that make a transition ambiguous
- Project scene records that are missing or unreadable
- Required component dependencies
Treat problems before publishing. Some warnings are harmless during active editing, but unresolved missing references usually become player-facing bugs.
Graph Explorer
Open the workbench Graph dock for Graph Explorer. It is shipped for relationship inspection (not a replacement for Object Flow editing).
Use it to answer:
| Question | Useful graph |
|---|---|
| How is this scene parented? | Scene hierarchy |
| What does this prefab contain? | Prefab anatomy |
| What events can fire? | Event map |
| Which assets does this scene depend on? | Asset dependencies |
| Which systems talk to this component? | Component map |
| What just ran? | Runtime trace |
Graph Explorer is most useful when a project becomes too large to understand by scanning the hierarchy alone. See Graph Explorer for mode details.
Debugging checklist
When something does not work:
- Reproduce it in Play mode.
- Confirm the correct scene is running.
- Confirm the object is selected and named clearly.
- Check the inspector for missing components or disabled interaction.
- Use Flow overlay to see whether the event fires.
- Inspect variables, component fields, and expressions.
- Check the Problems panel.
- Export a backup before making a risky change.
Browser dev tools
Opal is browser-native, so browser dev tools can help with hard bugs.
Use the console for script errors, failed asset loads, and network or storage messages. Use the application/storage panel when checking IndexedDB state on static hosts.