script-execute

Compile and execute C# code dynamically within Unity environments.

Updated Aug 26, 2025
One-click install
npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill script-execute-infotechsrealm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: script-execute
Source: https://github.com/infotechsrealm/PanicAtThePond/tree/main/.claude/skills/script-execute
Command: npx skills add https://github.com/infotechsrealm/PanicAtThePond --skill script-execute-infotechsrealm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The script-execute Skill automates the process of running C# code in the context of a Unity project, streamlining development workflows by dynamically compiling and executing code as needed.

Core Features & Use Cases

  • Dynamic C# Code Execution: Run full or body-only C# methods to extend and modify Unity behavior in real-time.
  • Full-Code Mode: Provide a complete class and method with static access, allowing for more complex manipulations.
  • Body-Only Mode: Execute code without full class structure, great for smaller tasks like toggling settings.
  • Unity Object Passing: Integrate and manipulate Unity objects such as GameObjects and Components directly in the C# code.

Quick Start

Compile and run a C# function in your Unity project with 'unity-mcp-cli run-tool script-execute --input '{ "csharpCode": "Debug.Log("Hello World!");", "className": "TestScript", "methodName": "PrintMessage", "parameters": "[]", "isMethodBody": false }'

Frequently Asked Questions about script-execute

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run dynamic C# code in Unity without restarting the editor?▼

Dynamic C# code execution in Unity is achieved by compiling and running scripts directly in the environment using Roslyn. This Skill automates the process, allowing you to execute full classes or body-only methods to modify Unity behavior in real-time.

Can I execute just a method body instead of a full class structure in Unity?▼

Yes, you can execute body-only C# methods for smaller tasks like toggling settings. This mode allows you to run code without defining the full class structure, while Full-Code mode is available for complex manipulations requiring static access.

What do I need to compile and execute C# scripts dynamically in a Unity project?▼

To compile and execute C# scripts dynamically in Unity, you need Roslyn for C# compilation and unity-mcp-cli for invocation. These dependencies enable the Skill to pass and manipulate Unity objects like GameObjects directly within the code.

How does dynamic script execution handle Unity GameObjects and components?▼

Dynamic script execution supports Unity object passing, allowing you to integrate and manipulate GameObjects and components directly in the C# code. This enables real-time script-based manipulation of Unity system settings and scene elements.

When should I use full-code mode versus body-only mode for C# script execution in Unity?▼

Use full-code mode when you need to provide a complete class and method with static access for complex manipulations. Use body-only mode for smaller tasks like toggling settings, where executing code without the full class structure is more efficient.