script-update-or-create

Write Unity C# scripts to a file path and report compilation errors.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Silac1995/My-World-Isekai-Unity --skill script-update-or-create-silac1995
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-update-or-create
Source: https://github.com/Silac1995/My-World-Isekai-Unity/tree/main/.claude/skills/script-update-or-create
Command: npx skills add https://github.com/Silac1995/My-World-Isekai-Unity --skill script-update-or-create-silac1995

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This tool solves the challenge of programmatically updating or creating Unity C# script files, ensuring the editor recognizes changes by refreshing assets and surfacing syntax errors.

Core Features & Use Cases

  • Create or update a script at a specified path.
  • Validate C# syntax and surface compilation errors.
  • Automatically run AssetDatabase.Refresh() after writing the file.

Quick Start

Run the unity-mcp-cli tool with the script-update-or-create command and a JSON payload containing filePath and content.

Frequently Asked Questions about script-update-or-create

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

FAQPage Schema
How do I programmatically create or update Unity C# scripts?

To programmatically create or update Unity C# scripts, provide a JSON object containing the filePath and content. The tool writes the provided content to the specified file path, verifying C# syntax and reporting compilation errors immediately.

Why does Unity not recognize my newly generated C# script file?

Unity may not recognize a newly generated C# script file because the AssetDatabase needs to be refreshed. This tool automatically runs AssetDatabase.Refresh() after writing the file, ensuring the Unity editor immediately recognizes the changes and surfaces any syntax errors.

Can I validate C# syntax and check for compilation errors when automating Unity script creation?

Yes, you can validate C# syntax and check for compilation errors when automating Unity script creation. The tool validates the script content and surfaces compilation errors for immediate feedback after writing the file to the specified path.

What is the best way to automate adding C# files to a Unity project workflow?

The best way to automate adding C# files to a Unity project workflow is using a CLI command with a JSON payload. This approach accepts filePath and content inputs, writes the script, refreshes the AssetDatabase, and integrates smoothly with existing tooling.

Does this Unity script automation tool work with the unity-mcp-cli?

Yes, this Unity script automation tool works directly with the unity-mcp-cli. You run the unity-mcp-cli tool with the script-update-or-create command and pass a JSON payload containing the filePath and content to update or create the target script.