exit_play_mode
Exit Unity Play Mode, unpause time, and return immediately after triggering the transition.
How to use it
exit_play_mode is exposed by the UnityCodeMCPServer MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the exit_play_mode tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
FULL UNITYCODEMCPSERVER LISTINGOther tools in UnityCodeMCPServer (7)
Enter Unity Play Mode, pause time and return immediately after triggering the transition. Intended to be used before gameplay automation tools.
Perform any task by executing generated C# scripts in Unity Editor context. Full access to UnityEngine, UnityEditor APIs, and reflection. Automatically captures logs, errors, and return values.
Capture the current Unity Game View as an image without routing screenshot capture through gameplay input calls.
Returns information about the current Unity Editor project and the UnityCodeMcpServer settings.
Temporarily unpause time, simulate configured Input System actions, collect logs, and pause again when finished.
Read Unity Editor Console logs with configurable entry limits (1-1000, default 200)
Run Unity tests via TestRunnerApi. Supports EditMode, PlayMode, or both. Can run all tests or filter by fully qualified test names.