Unity Project Cleaner

What does it do?

Unity Project Cleaner(UPC) will remove any unused assets from your project. UPC will give you a list of assets that you are not referencing in your scenes or resource folder. Once you get this list, you have the option to add/remove assets from the list. Then you move all your unnecessary assets into a temp folder so you can safely remove them.

File Structure

File Structure is a feature inside of UPC that will automatically sort your entire project for you. This is a very generic sort, but it will group things together for you. So all your model will go into a models folder, and your scripts will get broken up into C#, JS, Boo and shaders. File Structure will just make cleaning up your project easier and be easier to navigate your project.

Future Features

I am still thinking of new ideas and improving upon the current ones of UPC. As a person who hates having huge project folders and a ton of files in my project’s I am trying to do everything I can to remove the cluter and make sure everything is nice and neat so when you have to go back to an old project it’s not a complete nightmare.

-In editor file sorter program to visual see where each type of file is going(you can see an idea of that below)
-Tagging system to better sort your project
-Texture adjuster for mobile(be able to change your texture size and compression for iPhone and iPad or tablet and phone).
-Anything other people can think of that they would like to see

Known Issues

-UPC has trouble finding base classes for scripts. If your base class isn’t being used in any scene or isn’t in the resources folder, UPC will not detect it is needed. Sorry :frowning:

-UPC uses Resources.FindObjectsOfTypeAll() to find all gameobject(active or disabled) in each scene you pick. But using this methods also returns all prefabs/models in your project(idk why, but it’s a Unity thing) so if you have a prefab that has a bunch of components on it, those components are considered “Used”. The best thing to do is to manually go through each prefab and determine if it is needed or not, then delete them if you know you don’t need it.

-If you are using the Unity made Image Effects, you might get an error if you move scripts out of there. If you get any sort of issue, just move the scripts back into the Standard Assets/Image Effects folder to fix the problem.

Asset Store

Unity Project Cleaner

1 Like

Very useful, many times I have needed to remove unused assets from asset store projects that provide demo scenes that dont get used.

Thanks Softwizz!

Originally I had UPC just exclude items in the Resources,Editor and Plugins folders but after some testing I found that UPC was trying to remove items that were needed by things inside of these folders. Mainly the resources folder. Now what I am doing is running through the Resources folder and getting a list of all the GameObjects then checking their dependencies and then making sure anything that they are publicly referencing gets included in being used.

Very nice when will this be available?

Looks nice! Interested!

I am trying to get it out sooner rather than later. I am doing some more testing to make sure it works with a bunch of different scenarios. I want to try and get it submitted to Unity by the end of the week but things always come up.

UPC will also offer I quick and easy way to organize your project.

Looks pretty cool. I was planning on writing one of these, Yours seems to do the job though.

I read that unity already removes all unused assets from the project on build but I never truly trusted it.

Unity remove unnecessary assets from the final build. This will help you remove those assets in your project so you don’t have to look at them anymore lol.

Exactly what I want ha. Artists always create the messiest project folders. It’s incredibly annoying! I’ll convince my boss to buy it!

When are you releasing it on the asset store?

I want to keep testing it to make sure there isn’t anything that breaks but I hope to get it out soon. My goal was to get it submitted to the asset store by Friday.

This could give me my sanity back ….

Well it has been submitted to the Asset Store, I am going to give each person who wrote on here a free copy of the asset. Please if you like it, buy it. It is only going to be $5. Also I would really love any feedback about the asset to make it better.

3 Likes

Here is something I am working on to maybe add into UPC. It would be a way for you to customize how you want your project sorted. You would be able to tell UPC to put a specific file extension into a specific folder path for when you sort it. I am also looking into a tagging system so you can identify things better and sort by reference. This way you could mark items as “Player Scripts” and then file all your scripts under “Scripts/Player” with that tag. Still working on the details though.

1 Like

Yes, please!

So without me even know UPC has been released on the Asset Store already. The last time it took about 2-3 weeks to get approved. Anyways here is the link: Unity Project Cleaner

Excellent, now I can use asset store purchases and not have to spend a year deleting all the demo scene code graphics etc… without deleting a part of the asset thats needed, a massive time (and space) saver.

Just to clarify, if I have a load of assets in my project but no scene then this would remove all assets, is that correct.

Yes it will remove anything that isn’t needed. I import a lot of demo content then when I am making the final version I have sooooo many useless assets. The only thing to remember is that If they have demo prefabs, they need to be deleted since Resources.FindObjectsOfTypeAll() returns all prefabs and models. And if the demo prefabs are using scripts and materials(which they most likley are) those materials/scripts will be considered used. Just delete any demo prefabs and everything should run smoothly.

Ok before i try to use it i wonder it will not delete like interfaces and such right? i got alot of WIP stuff which isnt assigned anywere but might be in the future you might want to make so it wont Touch if the files in a WIP folder

All it will do is, move those assets into the “Temp” folder then you can go in and move stuff back into the project once you are using it. Another option is too move all your WIP stuff into the resources folder and UPC will not move those files.

UPC will never delete anything.