script-delete

Delete specified script files from a Unity project and refresh the AssetDatabase.

3.8k|349|Updated Apr 2, 2025
One-click install
npx skills add https://github.com/IvanMurzak/Unity-MCP --skill script-delete-ivanmurzak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: script-delete
Source: https://github.com/IvanMurzak/Unity-MCP/tree/main/Unity-MCP-Plugin/.claude/skills/script-delete
Command: npx skills add https://github.com/IvanMurzak/Unity-MCP --skill script-delete-ivanmurzak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables safe removal of script files from a Unity project, ensuring the editor state remains consistent by refreshing the AssetDatabase after deletion.

Core Features & Use Cases

  • Script Deletion: Removes specified script files from Assets and ensures the project reflects changes.
  • Unity Refresh: Calls AssetDatabase.Refresh() and waits for Unity compilation to complete before reporting results.
  • Pre-Deletion Readback: Suggests using the script-read tool to review target scripts before deletion.

Quick Start

Select the script files to delete and run the tool to remove them and refresh the Unity project.

Frequently Asked Questions about script-delete

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

FAQPage Schema
How do I safely delete Unity script files and refresh the AssetDatabase?

To safely delete Unity script files and refresh the AssetDatabase, select the target scripts and run an automated deletion tool. This removes the files from Assets and calls AssetDatabase.Refresh() to ensure the project state remains consistent.

Why does Unity hang or show errors after deleting a script during an editor workflow?

Unity may hang or show errors after deleting a script if the AssetDatabase is not refreshed and compilation is not allowed to finish. Proper script deletion invokes AssetDatabase.Refresh() and explicitly waits for Unity compilation to complete before reporting results.

What is the best way to automate Unity cleanup and remove selected script assets?

The best way to automate Unity cleanup for script assets is using a dedicated deletion tool that removes the specified files and refreshes the AssetDatabase. This ensures the editor state is updated and consistent after the selected script files are removed.

Can I use an automated tool to delete scripts and update the Unity project state without breaking references?

Yes, you can use an automated script deletion tool to remove files and update the Unity project state. It works within Unity editor workflows to safely delete scripts and refresh the AssetDatabase, ensuring the project reflects the changes.

Do I need to review a script before deleting it from a Unity project?

It is suggested to review a script before deleting it from a Unity project. Using a script-read tool to check the target scripts beforehand ensures you are removing the correct files before the deletion tool permanently deletes them and refreshes the AssetDatabase.