assets-refresh

Refreshes the Unity AssetDatabase and waits for script compilation to finish.

Updated May 27, 2026
One-click install
npx skills add https://github.com/AdielMag/ClashUp --skill assets-refresh-adielmag
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: assets-refresh
Source: https://github.com/AdielMag/ClashUp/tree/main/client/ClashUp.Unity/.claude/skills/assets-refresh
Command: npx skills add https://github.com/AdielMag/ClashUp --skill assets-refresh-adielmag

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 API, the editor's AssetDatabase becomes stale and scripts may not recompile, causing outdated assets or missing type information during automated workflows. ## Core Features & Use Cases - AssetDatabase Refresh: Runs AssetDatabase.Refresh with configurable ImportAssetOptions such as ForceSynchronousImport. - Compilation Awareness: Detects when the editor is compiling, returns a Processing response immediately, and delivers a follow-up completion notification once compilation finishes. - Failure Reporting: Returns compilation error details when EditorUtility.scriptCompilationFailed is detected. - Use Case: After generating or editing C# scripts from an external tool, trigger a refresh so Unity reimports assets and recompiles before running tests or building the project. ## Quick Start Ask the assistant to refresh the Unity AssetDatabase with force synchronous import so newly changed scripts recompile before continuing.

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 options parameter such as ForceSynchronousImport. The tool calls AssetDatabase.Refresh inside the Unity Editor and reports success or processing status.

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

Trigger an AssetDatabase refresh after editing the .cs file outside Unity. The refresh detects the change, starts recompilation, and returns a Processing response followed by a completion notification when compilation finishes.

What ImportAssetOptions values does AssetDatabase.Refresh support?▼

Supported values include Default, ForceUpdate, ForceSynchronousImport, ImportRecursive, DontDownloadFromCacheServer, and ForceUncompressedImport. ForceSynchronousImport is the default used by this tool.

Why does unity-mcp-cli return command not found?▼

The CLI is not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli, or invoke it through npx unity-mcp-cli instead.

Does the refresh tool report Unity compilation errors?▼

Yes. If EditorUtility.scriptCompilationFailed is true after the refresh, the tool returns a Success response containing the compilation error details instead of a generic failure.