Best way to make your build size lower?

As the title says. I heard unreal does this for you automatically and only puts assets that are in a scene or level to your build directory. But my project is building at like 600mb and that can’t be right because I’m not using many different assets in my level. I want to get the file size as low as possible. Is there something to enable to only include assets that get ran by your game and ignore ones just sitting in your project folder not used? If not what would be the best way to clean up my project of files I’m not using is whats the best way to find unused assets in my game. Thanks in advance.

One thing I did recently was try to delete all of the ‘Starter Content’ from my game package, which shaved nearly 500mb off of my build size.

The problem is, deleting assets STILL causes reference errors, so you’re better off when starting a project to NOT use the starter content at all. Other than that, grey-packing textures where possible, reducing texture size etc are the first culprits.

Unreal definitely doesn’t cut out un-used assets on it’s own, I know this from building my own shipped title recently. I had to forcibly remove the assets from the content browser. If that functionality does exist, it doesn’t work very well and I wouldn’t trust it to reduce your game size.

There is a lot of this kind of questions hardly answered, UE4 should have an official detailed guide of how to reduce project and builds size to the minimum possible.

What I do is, when i’m ready to publish my project. I duplicate my project folder, making it a separate project all together. Then I start deleting content to avoid ruining whatever habitat my stable version is working on. If something goes wrong, you can easily revert back without an issue. I think its a better practice than just deleting stuff on your native copy. I agree on the Starter Content part. It shaved off around 600 mb.

When deleting content, its best to do it within the Unreal Editor because some data might point to certain files that would otherwise go unnoticed by the engine, which can cause issues later down the line.

You might want to consider using a version system, (perforce, Svn, git) rather than making manual copies. If something goes wrong you can simply roll back to the last working version then. UE4 has integration for some.

My project grows further and further with no additional content added. I startet with about 600 MB, after a few weeks it growed to about 9 GB. The build size growed up, too. Seems that all kind of content gets packed into the game which isn’t actually referenced from any map.

I had always felt that way too. Deleting maps that reference anything extra (like tech/test maps) don’t lower the size at all. Thats why I recommend copying the project folder into its own “Publish Only” folder, which then you can open up in Unreal and safely remove files that you know are not referenced (make sure to delete the maps that won’t be used in the package). Once the maps you don’t need are deleted, it also delete things in the correct order, like blueprints > models > materials > textures > sounds.

It shouldn’t matter either way since making a new copy just for packaging is non-destructive. Once its packaged, you just delete the copied folder. It also allows you to hand calculate what files to delete and what files to keep without having to redownload files from the SVN.

Have you also tried deleting some of the content from your projects “Saved” directory. The Logs, Backup, and AutoSaves folders get massive with old crash dump and auto-save backup files. Deleting the contents of these folders reduced my project folder size from 4.5GB to 1.5GB… (don’t think it’ll help reduce your built package size though)…

3asba haha

I use local git repo… no need to download, no need even to copy… just give it a try :wink:

Sorry for popping up this old conversation but… do you know that when you migrate a level to another project, it migrates only the files related/linked to that level ? Hence cleaning up unused assets into your new project ?

I had a few problems once with some bad links, but generally it is working well. Also, do consult the documentation, in particular the part regarding compressing the apk file, possibly reducing the package size by up to 50%.
Bests