Documentation

Unity Spark

Open Unity Spark

Unity Spark

Introduction to test and debug tools in Unity Spark

Understand how Play mode, playtesting, the Console window, and the memory reading help you find and fix problems in your Unity Spark game.
Read time 2 minutesLast updated 3 hours ago

Test your game to check whether it plays the way you want. Debug it to find out why it doesn't. In Unity Spark, you test in Play mode, by yourself or with the AI assistant, then use the errors, logs, and memory reading to find and fix problems.

Test in Play mode

Select Play in the toolbar to run your game in the workspace, and Stop to go back to editing. Your game's scripts run as soon as you enter Play mode.
When you stop playing, Unity Spark resets anything that happened in the game while it ran, and any values you changed in the Inspector window while playing. Objects and components that you add or delete while playing don't reset. They stay added or deleted after you stop the game, so stop the game before you add or delete anything.

Assistant playtests

The assistant can play your game to test it, or give you a checklist of goals to play through. Either way, the assistant receives any errors and recent log lines from the playtest. For more information, refer to Playtests.

Check errors and logs

The Console window shows the log messages and runtime errors that your game's scripts produce, and errors from the editor itself. Use it to find out what went wrong when your game doesn't behave as expected.
The assistant reads the same output in the following situations:
  • When you enter
    /fix-errors
    , the assistant receives the errors from your most recent Play mode session. It fixes them, then enters Play mode to verify the fixes.
  • When the assistant playtests your game, it receives any errors and recent log lines from the playtest.
When you send a bug report with Include diagnostics enabled, the report includes errors and warnings from the console. For more information, refer to Control the data in bug reports and feedback.

Monitor memory use

Unity Spark tracks how much memory the editor uses in your browser tab. The memory reading turns yellow and then red as the editor gets close to its limit. If your project targets phones, Unity Spark also estimates whether your published game fits in the memory a phone allows, and warns you when it doesn't. The assistant can help you reduce memory use. For more information, refer to Monitor and reduce project memory usage.

Additional resources