0
0
Unityframework~8 mins

Build settings configuration in Unity - Performance & Optimization

Choose your learning style9 modes available
Performance: Build settings configuration
MEDIUM IMPACT
Build settings configuration affects the final app size, load time, and runtime performance by controlling which assets and code are included and how they are optimized.
Configuring build settings to optimize app size and load performance
Unity
PlayerSettings.stripEngineCode = true;
BuildPipeline.BuildPlayer(scenes, buildPath, BuildTarget.StandaloneWindows64, BuildOptions.None);
Stripping unused engine code reduces build size and speeds up loading.
📈 Performance Gainsaves 30-70MB in build size, reduces load time by 2-4 seconds
Configuring build settings to optimize app size and load performance
Unity
PlayerSettings.stripEngineCode = false;
BuildPipeline.BuildPlayer(scenes, buildPath, BuildTarget.StandaloneWindows64, BuildOptions.None);
Including unused engine code and assets increases build size and slows load time.
📉 Performance Costadds 50-100MB to build size, increases initial load time by several seconds
Performance Comparison
PatternBuild Size ImpactLoad Time ImpactRuntime MemoryVerdict
No code stripping, all assets includedHigh (large build)Slow (long load)High[X] Bad
Code stripping enabled, unused assets excludedLow (smaller build)Fast (short load)Lower[OK] Good
Rendering Pipeline
Build settings determine what assets and code are included in the final app. This affects how quickly the app loads and how much memory it uses during runtime.
Asset Bundling
Code Stripping
Compression
Loading
⚠️ BottleneckAsset Bundling and Code Stripping stages
Optimization Tips
1Always enable code stripping to remove unused engine code.
2Exclude unused scenes and assets from the build to reduce size.
3Use asset compression to speed up loading times.
Performance Quiz - 3 Questions
Test your performance knowledge
What is the main benefit of enabling code stripping in Unity build settings?
AReduces build size and speeds up app loading
BIncreases graphics quality
CAdds debugging information
DImproves network performance
DevTools: Unity Profiler and Build Report
How to check: Open the Build Report after building the app to see size breakdown. Use Unity Profiler to measure load times and memory usage during runtime.
What to look for: Look for large asset sizes, unused assets included, and long load times indicating poor build settings.