How to remove unused assets when packaging out

Hi guys .Is there any way to autoclear the assets unused?Or to get rid of them when paking out. Cause the Final packaged file is too huge.Thank you .Cheers.

For me, this is a very important question too. Waiting for somebody`s answer.

Hey guys,

When you go to package your project, there is an option within the ā€˜Packagingā€™ section within ā€˜Project Settingsā€™ called, ā€˜Directories to never cookā€™ which will exclude any assets within that specific directory from being included in your cooked and packaged build.

There is also a feature request currently entered to allow users to select specific assets to exclude from their packaged projects as well (UE-29585). I will add your questions as community interest to the feature request to try and get this feature improved.

If you have further questions or need additional assistance, please let me know.

Cheers,

1 Like

do you know the current status of that feature request as for 4.17 era?

Agreed. Almost every IDE has a ā€œCleanā€ button which does exactly that.

This is not a difficult concept. Scan all the code for referenced assets, compare it against what exists in the Content folder, then remove it.

Thatā€™s like 250 lines of code max and really would be important, especially when you have thousands of animations that have been duplicated many times.

Can you probably make an editor plugin then ? :slight_smile:

I have already started writing it, it will be done by tomorrow.

keep us updated with the new plugin

It is done, EXCEPT it doesnā€™t detect the referenced materials, yet. From my project alone, it cleaned 90gb of unused assets. I am working on the material aspect now and plan for a release very soon.

Any news on the plugin?

It is done and works well, just need to make a few tweaks and then iā€™ll put it up in the marketplace. Pic shows before and after running it.

Hi, your software copy only the used asset on a new project, is right ?
Can he check if a reference is used in cpp code ?

Do you think its possible to have a function to add your list of unused asset on the list of unpackage file ?
Because some assets are in my project for future release and not the actual one, I dont want to have a second project without (and I use Perforce) . I just want to reduce the size of the packaged game. :slight_smile:

Thank you !

Hiā€¦Rentā€¦Where we can found this plugin ???

It checks code first, then it checks assets and builds reference tables between all of them recursively.

And yeah that can be added.

I havenā€™t had much time to work on finishing this up but iā€™ll get it done soon and work on getting it up somewhere.

Great project! any news??

It works but it still doesnā€™t migrate the materials. More time is needed to get that to work. Unfortunately I just donā€™t have a lot of time with my game nearing release.