{"id":23752359,"url":"https://github.com/frankiedl/unity_asset_cleaner","last_synced_at":"2026-03-13T19:30:23.691Z","repository":{"id":266447074,"uuid":"898373156","full_name":"frankiedl/Unity_asset_cleaner","owner":"frankiedl","description":" A Unity Editor tool to help you find and safely remove unused assets from your project. It includes features like scene analysis, backup creation, and selective cleaning based on asset types.","archived":false,"fork":false,"pushed_at":"2024-12-04T09:53:28.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T21:52:22.060Z","etag":null,"topics":["asset","clean","cleaner","erase","reduce","reducer","script","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frankiedl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T09:27:02.000Z","updated_at":"2025-01-19T07:03:30.000Z","dependencies_parsed_at":"2024-12-04T10:30:59.641Z","dependency_job_id":"ee8fac5b-2b39-411a-8a82-f28322b559ca","html_url":"https://github.com/frankiedl/Unity_asset_cleaner","commit_stats":null,"previous_names":["frankiedl/unity_asset_cleaner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankiedl%2FUnity_asset_cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankiedl%2FUnity_asset_cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankiedl%2FUnity_asset_cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankiedl%2FUnity_asset_cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankiedl","download_url":"https://codeload.github.com/frankiedl/Unity_asset_cleaner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921877,"owners_count":19718842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asset","clean","cleaner","erase","reduce","reducer","script","unity"],"created_at":"2024-12-31T17:28:42.503Z","updated_at":"2026-03-13T19:30:23.596Z","avatar_url":"https://github.com/frankiedl.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Asset Cleaner\n\nA Unity Editor tool to safely find and remove unused assets from your project based on scene dependencies. It features a scene-based cleaning approach, automated backup system, and empty folder cleanup.\n\n![interface](https://github.com/user-attachments/assets/e287535b-4ad5-47a8-bf26-a7e82f6184cb)\n\n## Features\n\n- **Scene-Based Analysis**:\n  - Select specific scenes to preserve assets from\n  - Automatic current scene detection\n  - Build settings scenes integration\n  - Project-wide scene discovery\n\n- **Smart Asset Detection**:\n  - Analyzes dependencies for selected scenes\n  - Safe script detection (won't delete itself)\n  - Empty folder cleanup\n  - Deep dependency checking for materials and prefabs\n\n- **User-Friendly Interface**:\n  - Scene selection panel with Select/Deselect All\n  - Checkbox selection for each asset\n  - Quick deselection with red \"X\" button\n  - Asset preview\n  - Asset count display\n  - Clear deletion confirmation\n\n- **Supported Asset Types**:\n  - Scripts (.cs)\n  - Textures (.png, .jpg, .jpeg, .tga)\n  - Materials (.mat)\n  - Audio files (.mp3, .wav, .ogg)\n  - Prefabs (.prefab)\n\n- **Safety Features**:\n  - Automated backup system with timestamps\n  - Full directory structure preservation in backups\n  - Dependencies backup for materials and prefabs\n  - Protection against deleting the cleaner script itself\n  - Confirmation dialogs before deletion\n  - Empty folder cleanup (optional)\n\n## Installation\n\n1. Open your Unity project\n2. Create a folder named `Editor` in your Assets folder if it doesn't exist\n3. Copy the `AssetCleaner.cs` script into the `Editor` folder\n4. Unity will automatically compile the script and add the tool to your editor\n\n## How to Use\n\n### Opening the Tool\n1. In Unity, go to the top menu\n2. Click on `Tools \u003e Asset Cleaner`\n\n### Configuration\n\n#### Scene Selection:\n- Use the \"Scenes to Preserve\" foldout to select which scenes to analyze\n- The current scene is automatically detected and selected\n- All scenes from build settings are listed\n- Use \"Refresh Scene List\" to update the scene list\n- Use \"Select/Deselect All Scenes\" for quick configuration\n\n#### Asset Types to Check:\n- **Scripts**: C# script files\n- **Textures**: Image files (PNG, JPG, JPEG, TGA)\n- **Materials**: Material assets\n- **Audio**: Sound files (MP3, WAV, OGG)\n- **Prefabs**: Prefab assets\n\n#### Cleaning Options:\n- **Create Backup Before Deleting**: Enable/disable automatic backup\n- **Delete Empty Folders**: Remove empty folders after asset deletion\n- **Backup Folder**: Specify the folder path for backups (default: \"Assets/_DeletedAssetsBackup\")\n\n### Workflow\n\n1. **Configure Scene Selection**:\n   - Expand \"Scenes to Preserve\"\n   - Select the scenes whose assets you want to keep\n   - Use the \"Select All\" or \"Deselect All\" buttons as needed\n\n2. **Set Up Options**:\n   - Choose which types of assets to analyze\n   - Configure backup options\n   - Decide if empty folders should be cleaned\n\n3. **Find Unused Assets**:\n   - Click \"Find Unused Assets\"\n   - The tool will analyze your project based on selected scenes\n   - Assets used in selected scenes are protected\n\n4. **Review Assets**:\n   - Use checkboxes to mark/unmark assets for deletion\n   - Use the red \"X\" button to quickly unmark assets\n   - Preview assets to verify selection\n   - Use \"Select All/Deselect All\" for batch selection\n\n5. **Delete Assets**:\n   - Click \"Delete Marked Assets\"\n   - Confirm the deletion\n   - If backup is enabled, assets will be backed up first\n   - Empty folders will be cleaned if the option is enabled\n\n### Backup System\n\nThe backup system creates:\n- Timestamped folders for each deletion operation\n- Complete folder structure preservation\n- Dependency backups for materials and prefabs\n- Automatic backup folder creation if it doesn't exist\n\n## Best Practices\n\n1. **Before Using**:\n   - Make a full project backup\n   - Close unnecessary scenes\n   - Review your build settings scenes\n\n2. **During Use**:\n   - Carefully select which scenes to preserve\n   - Enable backup system for first few uses\n   - Review each asset before marking for deletion\n   - Pay special attention to shared assets\n\n3. **After Cleaning**:\n   - Test your project thoroughly\n   - Verify that all selected scenes work correctly\n   - Keep backups until everything is verified\n\n## Limitations\n\n- Dynamic asset loading (using `Resources.Load` or Addressables) might not be detected\n- Assets referenced only through reflection or string paths might be marked as unused\n- Scenes not selected for preservation will have their unique assets marked as unused\n\n## Troubleshooting\n\nIf you accidentally delete needed assets:\n1. Go to the backup folder (default: \"Assets/_DeletedAssetsBackup\")\n2. Find the timestamp folder from when the deletion occurred\n3. Copy the needed assets back to their original location\n4. Click Assets \u003e Refresh in Unity\n\n## Contributing\n\nFeel free to contribute to this project by:\n- Reporting issues\n- Suggesting enhancements\n- Submitting pull requests\n\n## License\n\nThis tool is released under the MIT License. Feel free to use it in your projects.\n\n## Version History\n\n- 2.0.0\n  - Added scene-based analysis\n  - Added empty folder cleanup\n  - Added self-protection for the cleaner script\n  - Improved UI with helpbox styling\n  - Added quick scene selection tools\n- 1.1.0\n  - Added checkbox interface\n  - Added Select All/Deselect All feature\n  - Improved material detection\n  - Added backup system\n- 1.0.0\n  - Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankiedl%2Funity_asset_cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankiedl%2Funity_asset_cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankiedl%2Funity_asset_cleaner/lists"}