بنقرة واحدة
unity-script
Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when working with a Unity project via MCP — creating or editing scenes, GameObjects, components, prefabs, materials, UI, lighting, navmesh, animations, terrain, C# scripts, or any other Unity Editor task.
Use when users want to run Unity tests or read test results.
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
Use when about to write or install a custom Editor script, add a [MenuItem], build a custom Editor window, or create a one-off Editor helper — to check whether a ready-to-paste template already exists in tooling/<domain>/ before reaching for Unity_CreateScript.
Use when users want to create Canvas, Button, Text, Image, or other UI elements.
Use when users want to find unused assets, duplicate files, or clean up the project.
| name | unity-script |
| description | Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project. |
Do not use Unity_RunCommand for script operations. The Unity MCP server exposes dedicated tools for every common script operation. Use them directly — they handle Domain Reload coordination and diagnostics natively.
| Operation | Tool | Typical use |
|---|---|---|
| Create a new C# script | Unity_CreateScript | Writes a new file under Assets/; sets up the MonoBehaviour/ScriptableObject/Editor template. |
| Delete a C# script | Unity_DeleteScript | By URI (unity://path/...) or by Assets/... path. |
| List script files | Unity_ListResources | Commonly filtered to *.cs under Assets/. |
| Search inside a script | Unity_FindInFile | Regex-level matches with line numbers. |
| Structured edits | Unity_ScriptApplyEdits | Method-level replace / insert / remove. Prefer this over raw text edits. |
| Syntax + diagnostics check | Unity_ValidateScript | Call before and after edits; surfaces compile errors before they trigger a Domain Reload. |
| Hash for concurrency | Unity_GetSha | Compare against your expected hash to detect conflicting edits before writing. |
Install-once Editor scripts (screenshot helpers, custom Editor windows, build steps, exporters): check
../tooling/SKILL.mdfor ready-to-paste templates before writing one from scratch.
The .cs filename (without extension) must exactly match the top-level class name. Unity's asset database relies on the 1:1 mapping — mismatches silently break MonoBehaviour attachment and asset references.
scriptName without .cs.After any script create / edit / delete, Unity triggers a Domain Reload (compilation + assembly swap). Tools return a compilation block where applicable — check it before issuing the next operation.
isCompiling: true, wait for it to settle before the next script edit.Unity_ValidateScript on the affected file to surface any errors.Assets/Scripts/<Feature>/.MonoBehaviour, ScriptableObject, or plain C# helper.Update-loop polling, repeated GameObject.Find calls, reflection in hot paths, avoidable allocations.Unity_ValidateScript and fix reported errors before marking a task done.