Make package size optimization a priority in 4.10/4.11 releases

I am just dipping my toes into both UE and Unity, and compiling a very simple game (player goes around collecting objects) will produce a vast size difference between UE and Unity. Unity easily produces a 20-30 mb executable, while a similar UE project is around 180mb all the way to around 300mb, with compression and production build options checked. What’s worse is that after following UE’s Battery Collector playlist, I discovered that the packaging process does not leave out the unused imported assets! I imported Starter Content but used like 3 to 5 things from it, only to realize that the packaged game included the whole thing. I had to manually delete each of them since there is no simple “delete this whole folder and leave referenced items alone”, it’s currently either delete everything or keep everything or do it yourself.

What I want to see in UE future releases is:

  • the option to exclude unused assets from packaging, or at least a function for us to scan the project and remove all unused content.
  • the ability for the engine to disable unused code from the packaging process. An empty project weighing 180mb is unacceptable, even for PC games. Maybe start with a checkbox list of UE modules where we can toggle the features we need. Perhaps toggling them off will disable/grey out them in the editor so that we won’t accidentally use them in production if checking in deploy time is too cumbersome.

Seeing 4.10 being a performance and stability release, I’d love to see some improvement in the unused code removal, and the asset cleaning in 4.11.

My interest is in to produce simple games, like Simogo’s Sensational December Machine, Dead in Bermuda, Memories of a lost dimension. It feels like these kind of games in the market are opting for Unity, while UE is mainly reserved for RPG, FPS and other AAA aspirants. I’m playing around with both UE and Unity now to see which suits my needs. UE wins hands down regarding workflow and editor intuitiveness, but Unity is the best right now regarding final ship-ability. As things are right now for UE, shipping builds are too un-optimized, and I feel unconfident in investing my effort into UE seeing that the final ship-ability is not yet acceptable. So please, Epic! Make Unity no longer an option for me!

Great suggestion.

This isn’t as easy to achieve as you might think. There are a lot of special cases which might break your shipping build. Just think about asset references in code or in data tables.

So I wouldn’t count on such a feature being implemented in the feature.

What I have observed is that UE4 does indeed do some checking on unused assets and does not include them in the packaged build.
But: If a redirector exists, the asset is considered as “referenced” and thus included in the build, even if not used in the game.
At least thats what I observed to some degree…
Try to remove the redirectors, (context menu on the root content folder) and package again. See if that changes your build size…