Build Size
About
Build size is crucial for web-games.
Target Build Size - 20MB
Code Size
| Optimization | Size (MB) .wasm | Size (MB) .wasm.gz | Comment |
|---|---|---|---|
| Vanila | 176 | 30 | Build from Engine folder |
| No Plugins | 138 | 25 | DisableEnginePluginsByDefault is very useful |
| Shipping | 56 | 16 | |
| -Oz Optimization Level | 46 | 13 | Using my patched version |
| Link time optimization | 42 | 12 | Using my patched version. Slow to build |
| No Debug Info | 32 | 10 |
Examples
Shared Build
TODO:
- Put game-specific modules and plugins into a separate
.wasm
Build Config
Source/ALSV.Target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class ALSVTarget : TargetRules
{
public ALSVTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
bool isShipping = Target.Configuration == UnrealTargetConfiguration.Shipping;
bAllowLTCG = isShipping;
bCompileForSize = isShipping;
bForceDebugInfo = !isShipping;
bDisableDebugInfo = isShipping;
bOmitPCDebugInfoInDevelopment = isShipping;
//bUseLoggingInShipping = true;
bCompileChaos = false;
bUseChaos = false;
bCompileICU = false;
bUsesSlate = !isShipping; // Need for console
ExtraModuleNames.AddRange( new string[] { "ALSV" } );
}
}Resources Size
- No fallback font (DroidSansFallback.uasset)
- No AtmosphericFog on map
- Reduced textures size (DefaultDeviceProfiles.ini)
- Reduced size blue noise texture (BlueNoiseTextureName=/Game/…)
- ForceNoPrecomputedLight
TODO:
- Cleanup fonts
- Cleanup localization
- Remove Slate 🤔
Examples
Shared Build
TODO:
- Share resources between independant games. Special project setup will be needed.

