execute_code
Execute C# code in the Unity Editor directly, bypassing slow recompilations. Automatically wraps snippets in a static class with restricted system access.
Instructions
Execute C# code in Unity Editor via Roslyn. 10-40x faster than recompile. Security: no System.IO, System.Net, System.Diagnostics. Bare statements are auto-wrapped in a static class — no boilerplate needed. Example: "var go = new GameObject("Test"); return go.name;"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| undo_label | No | execute_code |