assets-refresh

Refreshes the Unity AssetDatabase and forces script recompilation after external file changes.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill assets-refresh-ishaansingh-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-refresh
Source: https://github.com/ishaansingh-ai/Mechanical-2D/tree/main/.claude/skills/assets-refresh
Command: npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill assets-refresh-ishaansingh-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? When files are added or modified in a Unity project outside the Unity Editor API, the AssetDatabase can become stale, causing missing assets or outdated scripts. This Skill refreshes the AssetDatabase and forces recompilation of changed '.cs' scripts so the project state stays in sync. ## Core Features & Use Cases - AssetDatabase Refresh: Triggers Unity's AssetDatabase.Refresh through the unity-mcp-cli command line tool. - Import Options Control: Accepts Unity ImportAssetOptions such as ForceUpdate, ForceSynchronousImport, and ImportRecursive for fine-grained refresh behavior. - Use Case: After generating or editing C# scripts and asset files from an external tool or AI agent, run this Skill to force Unity to reimport the changed files and recompile scripts before continuing development. ## Quick Start Ask the AI to refresh the Unity AssetDatabase with ForceSynchronousImport so the newly added scripts are recompiled.

Frequently Asked Questions about assets-refresh

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

FAQPage Schema
How do I refresh the Unity AssetDatabase from the command line?▼

Run unity-mcp-cli run-tool assets-refresh with an optional JSON input specifying import options. This invokes Unity's AssetDatabase.Refresh through the MCP bridge without opening the editor manually.

How to force Unity script recompilation after changing .cs files externally?▼

Call the assets-refresh tool after modifying .cs files outside Unity. The refresh detects the changed scripts and triggers recompilation, optionally using ForceUpdate or ForceSynchronousImport options.

What import options does Unity AssetDatabase.Refresh support?▼

Supported options include Default, ForceUpdate, ForceSynchronousImport, ImportRecursive, DontDownloadFromCacheServer, and ForceUncompressedImport. Pass one as the options field in the JSON input.

Why is unity-mcp-cli not found when running the refresh command?▼

The CLI is not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli, or prefix commands with npx unity-mcp-cli as a fallback.

When should I use ForceSynchronousImport instead of Default?▼

Use ForceSynchronousImport when subsequent steps depend on assets being fully imported before continuing, such as compiling scripts or running tests immediately after the refresh.