uloop-execute-dynamic-code

Execute arbitrary C# statements in the Unity Editor from the command line.

500|44|Updated Jun 15, 2025
One-click install
npx skills add https://github.com/hatayama/unity-cli-loop --skill uloop-execute-dynamic-code-hatayama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uloop-execute-dynamic-code
Source: https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-execute-dynamic-code
Command: npx skills add https://github.com/hatayama/unity-cli-loop --skill uloop-execute-dynamic-code-hatayama

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Execute dynamic C# code against the Unity Editor from the command line to automate editing tasks, testing scenarios, and rapid prototyping without opening the editor UI.

Core Features & Use Cases

  • Inline C# snippet execution against UnityEditor/UnityEngine APIs from a CLI workflow.
  • Wire up prefabs, modify SerializedObject properties, and perform small scene edits during Edit or Play mode.
  • Use cases include automated setup, quick experiments, and QA checks that require live editor interaction.

Quick Start

Run a simple one-liner from the CLI to execute a statement in the active Unity Editor session.

Frequently Asked Questions about uloop-execute-dynamic-code

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

FAQPage Schema
How do I execute dynamic C# code in Unity Editor from the command line?

You can run dynamic C# code in Unity Editor from the CLI by passing direct C# statements to automate editor tasks without opening the UI. It supports inline snippet execution against UnityEditor APIs during CLI workflows.

Can I use CLI scripting to modify SerializedObject properties in Unity?

Yes, CLI scripting can modify SerializedObject properties in Unity by executing dynamic C# statements in the active editor session. You can wire up prefabs, tweak serialized properties, and perform small scene edits during Edit or Play mode.

Does this dynamic C# execution method support file I/O and asset creation?

No, this dynamic C# execution method does not support file I/O and asset creation. It explicitly excludes these operations to preserve project safety while running arbitrary statements against the Unity Editor environment.

What is compile-only mode for running C# snippets in Unity Editor?

Compile-only mode for running C# snippets in Unity Editor is a diagnostic feature that checks code for compilation errors before actual execution. It allows you to validate arbitrary C# statements pre-execution to ensure they are syntactically correct.

Can I run C# statements in Unity Play mode via CLI automation?

Yes, you can run C# statements in Unity Play mode via CLI automation. The execution accepts direct statements against the active Unity Editor session, supporting both Edit and Play mode for automated setup and quick experiments.