stop_play_in_editor
End an active Play-in-Editor (PIE) session in Unreal Editor, optionally forcing it when another MCP session or a human started PIE.
Instructions
Press Stop: requests the end of the Play-in-Editor session (EditorRequestEndPlay). WARNING: pie_stopped is HARDCODED true whenever PIE was running and teardown is async, so the only oracle is a follow-up is_play_in_editor_active. WARNING: Treat every call as an operation that CAN KILL THE EDITOR: any UWorld/UPackage handle left in an execute_python global keeps the PIE world rooted and the engine aborts with "Object ... from PIE level still referenced" -- purge the main namespace and gc.collect() BEFORE calling. Refuses when another MCP session (or a human) started the PIE, and then needs force=true.
Returns: { pie_stopped: bool (hardcoded true when PIE was up -- not a measurement), was_in_pie: bool, still_in_pie: bool (read immediately, so usually still true: teardown is async), message: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Optional bool (default false). Override the PIE-ownership guard: stop even if another session (or a manually-started PIE) currently owns Play-in-Editor. Read by the server before the tool runs; without it, stopping a PIE your session does not own is refused with pie_owner/requester in the payload. |