Skip to content

feat: add execute_code tool for running arbitrary C# in Unity Editor#1001

Open
zaferdace wants to merge 3 commits intoCoplayDev:betafrom
zaferdace:feat/execute-code
Open

feat: add execute_code tool for running arbitrary C# in Unity Editor#1001
zaferdace wants to merge 3 commits intoCoplayDev:betafrom
zaferdace:feat/execute-code

Conversation

@zaferdace
Copy link
Copy Markdown
Contributor

@zaferdace zaferdace commented Mar 29, 2026

Summary

Adds a built-in execute_code tool that compiles and runs arbitrary C# code inside the Unity Editor. Uses CSharpCodeProvider for in-memory compilation — no Roslyn dependency, no script files created.

This fills the gap between execute_menu_item (limited to menu paths) and the runtime_compilation custom tool (requires Roslyn + opt-in setup). execute_code works out of the box with zero configuration.

Actions

Action Description
execute Compile and run a C# method body, return the result
get_history List past executions with code previews
replay Re-run a history entry with its original settings
clear_history Clear execution history

Safety

  • safety_checks (default: true) blocks known dangerous patterns: File.Delete, Process.Start, AssetDatabase.DeleteAsset, EditorApplication.Exit, infinite loops (while(true), for(;;))
  • Clearly documented as a pattern-based blocklist, not a security sandbox — advanced bypass is possible
  • destructiveHint=True annotation for MCP clients
  • Can be disabled with safety_checks=false for trusted workflows

Example usage

# Get Unity version
execute_code(action="execute", code="return Application.unityVersion;")

# Count GameObjects in scene
execute_code(action="execute", code="return GameObject.FindObjectsOfType<GameObject>().Length;")

# Query camera info
execute_code(action="execute", code='var cam = Camera.main; return new { name = cam.name, ortho = cam.orthographic, size = cam.orthographicSize };')

# Check history
execute_code(action="get_history", limit=5)

# Replay entry
execute_code(action="replay", index=0)

CLI

unity-mcp code execute "return Application.unityVersion;"
unity-mcp code execute -f my_script.cs
unity-mcp code history --limit 5
unity-mcp code replay 0
unity-mcp code clear-history

Files

File Lines Type
MCPForUnity/Editor/Tools/ExecuteCode.cs 329 New
Server/src/services/tools/execute_code.py 85 New
Server/tests/test_execute_code.py 149 New
Server/src/cli/commands/code.py +89 Modified
manifest.json +4 Modified

Test plan

  • 17 Python unit tests pass (uv run python -m pytest tests/test_execute_code.py -v)
  • C# compiles in Unity 6 (6000.3.10f1)
  • Verified execute action returns correct results (Application.unityVersion, Camera.main, GameObject count)
  • Verified safety_checks blocks File.Delete, while(true)
  • Verified history, replay, clear_history actions
  • Verified compile errors show user-friendly line numbers (wrapper offset subtracted)
  • Verify in CI

Design decisions

  • CSharpCodeProvider over Roslyn: No external dependencies, works in any Unity project without setup. Trade-off: older compiler, less diagnostic detail.
  • No timeout parameter: Runs on main thread (required for Unity API access). A timeout would need a background thread which breaks Camera.main, Selection, etc. Infinite loop prevention is handled by safety_checks pattern matching instead.
  • safety_checks not sandbox: Deliberately named to avoid implying stronger protection than a pattern blocklist provides.
  • History stores code previews, not full code: Truncated to 500 chars to avoid large payloads and secret retention.

🤖 Generated with Claude Code

Summary by Sourcery

Add a new execute_code tool for running arbitrary C# code in the Unity Editor, with history and safety controls, and expose it through the MCP service and CLI.

New Features:

  • Introduce an execute_code MCP tool in Unity that compiles and executes C# code in the Editor, with optional safety checks and execution history management.
  • Expose execute_code capabilities via a new server-side execute_code service supporting execute, get_history, replay, and clear_history actions.
  • Extend the CLI code commands to support executing C# snippets or files, viewing history, replaying entries, and clearing history.

Enhancements:

  • Register the execute_code tool in the manifest for discovery by MCP clients.

Tests:

  • Add unit tests covering execute_code server tool behavior, including parameter validation, forwarding to Unity, history limits, error normalization, and response handling.

Summary by CodeRabbit

  • New Features
    • Run C# code inside the Unity Editor with access to Unity APIs; execution, history, replay and clear actions available.
    • CLI: code execute, code history, code replay, code clear-history.
  • Bug Fixes / Reliability
    • Improved compilation and runtime error reporting with clearer messages and stack info.
  • Safety
    • Optional safety checks that block known dangerous patterns (can be disabled).
  • Tests
    • Added tests covering execute/history/replay/clear workflows.

Adds a built-in `execute_code` tool that compiles and runs C# code
inside the Unity Editor via CSharpCodeProvider. No external dependencies
(Roslyn not required), no script files created.

## Actions
- `execute` — compile and run C# method body, return result
- `get_history` — list past executions with previews
- `replay` — re-run a history entry with original settings
- `clear_history` — clear execution history

## Safety
- `safety_checks` (default: true) blocks known dangerous patterns
  (File.Delete, Process.Start, AssetDatabase.DeleteAsset, infinite loops)
- Clearly documented as pattern-based blocklist, NOT a security sandbox
- `destructiveHint=True` annotation for MCP clients

## Features
- In-memory compilation with all loaded assembly references
- User-friendly error line numbers (wrapper offset subtracted)
- Execution history (max 50 entries) with code preview truncation
- Replay preserves original safety_checks setting
- CLI commands: `code execute`, `code history`, `code replay`, `code clear-history`

## Files
- C#: `MCPForUnity/Editor/Tools/ExecuteCode.cs` (329 lines)
- Python: `Server/src/services/tools/execute_code.py` (85 lines)
- CLI: `Server/src/cli/commands/code.py` (+89 lines)
- Tests: `Server/tests/test_execute_code.py` (17 tests, all passing)
- Manifest: added `execute_code` entry

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 29, 2026

Reviewer's Guide

Introduces a new execute_code tool that compiles and runs arbitrary C# in the Unity Editor with safety checks and history, wires it through the MCP server, and exposes it via new CLI subcommands and manifest registration.

Sequence diagram for replay action using history

sequenceDiagram
    actor cli_user
    participant CLI as CLI_code_command
    participant Server as Server_execute_code_tool
    participant Transport as Unity_transport
    participant Editor as Unity_Editor
    participant Tool as ExecuteCode

    cli_user->>CLI: unity-mcp code replay 0
    CLI->>Server: run_command execute_code {action: replay, index: 0}
    Server->>Transport: async_send_command_with_retry execute_code params
    Transport->>Editor: JSON RPC execute_code params
    Editor->>Tool: HandleCommand(JObject params)
    Tool->>Tool: HandleReplay(params)
    Tool->>Tool: lookup HistoryEntry by index
    Tool->>Tool: HandleExecute(replayParams)
    Tool->>Tool: CompileAndExecute(stored code)
    Tool-->>Tool: SuccessResponse or ErrorResponse
    Tool-->>Editor: response
    Editor-->>Transport: response
    Transport-->>Server: response dict
    Server-->>CLI: {success, message, data}
    CLI-->>cli_user: formatted output + Result line
Loading

Class diagram for new ExecuteCode tool and history entries

classDiagram
    class ExecuteCode {
        <<static>>
        -int MaxCodeLength
        -int MaxHistoryEntries
        -int MaxHistoryCodePreview
        -int WrapperLineOffset
        -string WrapperClassName
        -string WrapperMethodName
        -string ActionExecute
        -string ActionGetHistory
        -string ActionClearHistory
        -string ActionReplay
        -List~HistoryEntry~ _history
        -HashSet~string~ _blockedPatterns
        +object HandleCommand(JObject params)
        -object HandleExecute(JObject params)
        -object HandleGetHistory(JObject params)
        -object HandleClearHistory()
        -object HandleReplay(JObject params)
        -object CompileAndExecute(string code)
        -string WrapUserCode(string code)
        -void AddReferences(CompilerParameters parameters)
        -string CheckBlockedPatterns(string code)
        -void AddToHistory(string code, object result, double elapsedMs, bool safetyChecks)
        -object SerializeResult(object result)
    }

    class HistoryEntry {
        +string code
        +bool success
        +string resultPreview
        +double elapsedMs
        +string timestamp
        +bool safetyChecksEnabled
    }

    ExecuteCode "1" o-- "*" HistoryEntry
Loading

File-Level Changes

Change Details Files
Add Unity-side execute_code tool that compiles and executes C# with pattern-based safety checks and execution history.
  • Implement ExecuteCode MCP tool with actions execute, get_history, replay, and clear_history.
  • Use CSharpCodeProvider to wrap user code in a helper class/method, compile in-memory, and invoke via reflection.
  • Add pattern-based safety checks for destructive APIs and infinite loops, with configurable safety_checks flag.
  • Maintain bounded in-memory execution history with code previews, timing, success flag, and result preview.
  • Normalize compilation/runtime errors into structured ErrorResponse/SuccessResponse objects and adjust compiler error line numbers to user code.
MCPForUnity/Editor/Tools/ExecuteCode.cs
MCPForUnity/Editor/Tools/ExecuteCode.cs.meta
Add server-side execute_code tool that forwards requests to Unity and normalizes responses.
  • Register execute_code as an MCP tool with descriptive docs and destructiveHint annotation.
  • Define execute_code handler supporting execute, get_history, replay, and clear_history actions and their parameters.
  • Route requests to the Unity Editor via send_with_unity_instance/async_send_command_with_retry with per-action param validation and clamping.
  • Normalize Unity responses into a stable dict shape, handling error messages and non-dict responses.
Server/src/services/tools/execute_code.py
Add comprehensive tests for the server-side execute_code tool behavior and parameter routing.
  • Mock Unity transport and instance resolution to test forwarding without a real Unity Editor.
  • Cover execute behavior including code forwarding, safety_checks default/override, and required-code validation.
  • Test get_history, replay, and clear_history param handling, clamping, and required index enforcement.
  • Verify error normalization for failed/invalid Unity responses and that per-action params are isolated.
Server/tests/test_execute_code.py
Extend CLI code command group to support executing code and managing execute_code history.
  • Update code command group description to include execution capabilities.
  • Add code execute subcommand that reads code from arg or file, toggles safety checks, and prints formatted result plus success summary.
  • Add history, replay, and clear-history subcommands that call execute_code with appropriate actions and echo formatted responses.
  • Wire new subcommands through existing config, output formatting, and Unity error handling utilities.
Server/src/cli/commands/code.py
Register execute_code tool in the MCP manifest for discovery.
  • Add execute_code entry with description emphasizing arbitrary C# execution inside Unity Editor.
  • Keep existing execute_custom_tool and execute_menu_item entries unchanged.
manifest.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 74e1fe8f-d181-4251-88d8-672446fadd8e

📥 Commits

Reviewing files that changed from the base of the PR and between d2847a9 and 752175c.

📒 Files selected for processing (1)
  • Server/src/cli/commands/code.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • Server/src/cli/commands/code.py

📝 Walkthrough

Walkthrough

New Unity Editor tool ExecuteCode exposes HandleCommand(JObject) with actions execute, get_history, clear_history, and replay; compiles and runs wrapped C# in-memory (optional safety checks), records a 50-entry history, and is supported by server-side MCP tooling, CLI subcommands, tests, and a manifest entry.

Changes

Cohort / File(s) Summary
Unity ExecuteCode Tool
MCPForUnity/Editor/Tools/ExecuteCode.cs, MCPForUnity/Editor/Tools/ExecuteCode.cs.meta
Adds ExecuteCode editor tool exposing HandleCommand(JObject); supports execute/get_history/clear_history/replay, safety-check gating, in-memory compilation via CSharpCodeProvider, runtime invocation, error/result serialization, and a capped history (50 entries).
Server MCP Tool
Server/src/services/tools/execute_code.py
New async MCP tool execute_code that validates action-specific params (including required code/index), clamps limit to [1,50], removes irrelevant fields, forwards to Unity via send_with_unity_instance, and normalizes responses to {success, message, data}.
CLI Commands
Server/src/cli/commands/code.py
Adds code execute, code history, code replay, and code clear-history CLI subcommands; supports inline or file source, --no-safety-checks, prints formatted outputs and conditional Result: on success.
Tests
Server/tests/test_execute_code.py
New pytest module mocking Unity integration; verifies param forwarding/isolation, required param enforcement, clamped limits, success/error normalization, and replay/clear-history behaviors.
Manifest
manifest.json
Registers new execute_code tool in the manifest for discovery/use by MCP tooling.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI Client
    participant Server as MCP Server
    participant Tool as execute_code Tool
    participant Unity as Unity Editor<br/>(ExecuteCode)
    
    CLI->>Server: code execute --source "..."
    Server->>Tool: execute_code(action="execute", code="...", safety_checks=True)
    Tool->>Tool: validate & isolate params
    Tool->>Unity: send_with_unity_instance(tool_name="execute_code", params={...})
    Unity->>Unity: safety checks, wrap code, compile via CSharpCodeProvider
    Unity->>Unity: invoke compiled method, capture result/exception
    Unity-->>Tool: SuccessResponse / ErrorResponse
    Tool->>Server: normalized {success, message, data}
    Server->>CLI: formatted output (Result if success)
Loading
sequenceDiagram
    participant CLI as CLI Client
    participant Server as MCP Server
    participant Tool as execute_code Tool
    participant Unity as Unity Editor<br/>(ExecuteCode)
    
    CLI->>Server: code history --limit 5
    Server->>Tool: execute_code(action="get_history", limit=5)
    Tool->>Tool: clamp limit to [1,50]
    Tool->>Unity: send_with_unity_instance(tool_name="execute_code", params={action, limit})
    Unity->>Unity: retrieve _history slice and format entries
    Unity-->>Tool: SuccessResponse with history
    Tool->>Server: normalized dict
    Server->>CLI: print history entries
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • justinpbarnett

Poem

🐰 I hop through lines and stitch a class so neat,

I wrap your code, compile, and make it sweet.
With checks and history, each run I store,
I nibble bugs and return the score —
A tiny rabbit cheering, code complete.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.20% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main feature being added—a new execute_code tool for running C# in the Unity Editor—matching the core purpose of this PR.
Description check ✅ Passed The description covers the required sections: summary, type of change (new feature), changes made, test plan, and design decisions; documentation updates section is checked as not applicable since tool registration occurs in manifest.json.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • The hard-coded WrapperLineOffset = 9 is brittle since it depends on the exact structure of WrapUserCode; consider computing the offset dynamically (e.g., by counting wrapper lines) so compiler error line mapping stays correct if the wrapper changes.
  • In AddReferences, walking all AppDomain.CurrentDomain.GetAssemblies() and adding locations on every execution could become expensive; consider caching the resolved reference list in a static field so subsequent compilations reuse it.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The hard-coded `WrapperLineOffset = 9` is brittle since it depends on the exact structure of `WrapUserCode`; consider computing the offset dynamically (e.g., by counting wrapper lines) so compiler error line mapping stays correct if the wrapper changes.
- In `AddReferences`, walking all `AppDomain.CurrentDomain.GetAssemblies()` and adding locations on every execution could become expensive; consider caching the resolved reference list in a static field so subsequent compilations reuse it.

## Individual Comments

### Comment 1
<location path="MCPForUnity/Editor/Tools/ExecuteCode.cs" line_range="20-29" />
<code_context>
+        private const int WrapperLineOffset = 9;
</code_context>
<issue_to_address>
**issue (bug_risk):** WrapperLineOffset appears off by one, which will skew reported user line numbers.

User code begins at physical line 11, but WrapperLineOffset is set to 9. That makes an error on the first user line map to 2 instead of 1 (11 - 9), so all reported error lines are off by one. Please update WrapperLineOffset to 10, or compute it directly from WrapUserCode so it stays correct if the wrapper changes.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@MCPForUnity/Editor/Tools/ExecuteCode.cs`:
- Line 20: The WrapperLineOffset constant is off-by-one; update the value of
WrapperLineOffset (used to adjust compiler error line numbers) from 9 to 10 so
it accounts for the full 10-line wrapper header generated by the template (the
wrapper that declares MCPDynamicCode and Execute). Locate the constant named
WrapperLineOffset and change its value to 10, then run a test compiling a sample
user snippet that triggers an error on the first user line to verify the
reported line now matches the user's first line.

In `@Server/src/cli/commands/code.py`:
- Around line 38-40: The file-reading branch uses a plain open(...) call which
relies on platform default encoding; change the open in the CLI command where it
reads into variable "source" (the with open(file, "r") as f: block) to
explicitly set the encoding (e.g., encoding="utf-8") so non-ASCII characters are
handled consistently across platforms; keep the same read() logic and consider
adding errors="replace" if you want to tolerate malformed bytes.

In `@Server/src/services/tools/execute_code.py`:
- Around line 21-34: The mcp_for_unity_tool decorator invocation for the Execute
Code tool is missing the required group parameter; update the decorator call
(mcp_for_unity_tool) to include group='scripting_ext' (or another allowed group
from 'core','vfx','animation','ui','scripting_ext','probuilder','testing') so
the tool is properly categorized, keeping the existing description and
ToolAnnotations (title="Execute Code", destructiveHint=True) intact; ensure the
new group argument is added at the top-level decorator arguments alongside
description and annotations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 096cf8a3-00d7-4c55-87a7-da20c45d6e63

📥 Commits

Reviewing files that changed from the base of the PR and between 6907bad and c18ee94.

📒 Files selected for processing (6)
  • MCPForUnity/Editor/Tools/ExecuteCode.cs
  • MCPForUnity/Editor/Tools/ExecuteCode.cs.meta
  • Server/src/cli/commands/code.py
  • Server/src/services/tools/execute_code.py
  • Server/tests/test_execute_code.py
  • manifest.json

- Fix off-by-one in WrapperLineOffset (9 → 10)
- Cache resolved assembly paths in static field for performance
- Add encoding="utf-8" to CLI file read
- Add group="scripting_ext" to Python tool decorator

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Server/src/cli/commands/code.py (1)

75-92: Consider extracting result printing helper.

The result printing logic (lines 89-92) is duplicated from the execute command (lines 53-56). This is minor given it's only 4 lines.

♻️ Optional: Extract helper function
def _print_execution_result(result: dict[str, Any]) -> None:
    """Print execution result if present."""
    if result.get("success"):
        data = result.get("data", {})
        if data and data.get("result") is not None:
            print_success(f"Result: {data['result']}")

Then use in both commands:

     click.echo(format_output(result, config.format))
-    if result.get("success"):
-        data = result.get("data", {})
-        if data and data.get("result") is not None:
-            print_success(f"Result: {data['result']}")
+    _print_execution_result(result)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Server/src/cli/commands/code.py` around lines 75 - 92, The replay command
duplicates result-printing logic found in execute; extract a small helper (e.g.,
_print_execution_result(result: dict[str, Any])) that encapsulates the existing
conditional printing logic and call it from both replay() and execute() to
remove duplication; locate the two blocks in replay (function replay) and
execute (function execute) and replace the repeated lines that check
result.get("success") / data.get("result") with a call to
_print_execution_result(result).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Server/src/cli/commands/code.py`:
- Around line 75-92: The replay command duplicates result-printing logic found
in execute; extract a small helper (e.g., _print_execution_result(result:
dict[str, Any])) that encapsulates the existing conditional printing logic and
call it from both replay() and execute() to remove duplication; locate the two
blocks in replay (function replay) and execute (function execute) and replace
the repeated lines that check result.get("success") / data.get("result") with a
call to _print_execution_result(result).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1318bce-6322-422c-abd5-cf7f754d5ed5

📥 Commits

Reviewing files that changed from the base of the PR and between c18ee94 and d2847a9.

📒 Files selected for processing (3)
  • MCPForUnity/Editor/Tools/ExecuteCode.cs
  • Server/src/cli/commands/code.py
  • Server/src/services/tools/execute_code.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • MCPForUnity/Editor/Tools/ExecuteCode.cs

Address CodeRabbit nitpick — deduplicate result printing logic
between execute and replay commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant