exec_python_persistent
Run Python code in Unreal Engine that retains variables, imports, and definitions across successive calls. Build up state incrementally without reloading scripts.
Instructions
Tier 2 PR #45: like execute_unreal_python but state PERSISTS across calls. Variables, imports, and function/class definitions defined in one call are visible in the next -- letting Claude build up state across turns without re-loading every time. Implemented via UE's FPythonCommandEx with FileExecutionScope=Public (shared globals dict with the editor's Python console). Pairs with reset_python_state. Same output-capture caveat as execute_unreal_python: ExecuteFile mode does not capture stdout via CommandResult; use unreal.log marker + get_log_lines.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python source to execute against the persistent globals dict. |