Unity 6
Build Optimization
Android App Bundle
APK Size
iOS Optimization
Addressables
Mobile Game Development

Unity 6 Build Size Optimization for Android and iOS

28 min read
Eshan Naithani

Every megabyte added to a mobile game's binary increases store download abandonment over cellular networks, slows down CI/CD pipeline artifacts, and raises the risk of hitting platform publishing limits on Google Play or the Apple App Store. Yet many teams attempt Unity build size optimization by deleting unused files from the Project window—unaware that Unity already strips unreferenced project assets automatically unless specific architectural traps force them into the build.

Effective Unity asset size reduction requires auditing what Unity actually packs into the player archive (BuildReport), configuring IL2CPP and UnityLinker code stripping, applying hardware-native texture and audio compression, pruning native SDK slices, and moving post-boot content into Unity Addressables.

This engineering guide covers end-to-end Unity 6 build size optimization for Android and iOS—from Unity reduce APK size workflows and Unity Android App Bundle optimization to iOS App Thinning, automated BuildReport inspection in C#, and a copy-ready Unity Build Size Audit Checklist.

Optimizing runtime FPS and RAM alongside binary size? Pair this build guide with our Unity 6 Mobile Game Optimization Guide and Unity 6 Mobile Performance Checklist.


1. APK vs. Android App Bundle (AAB) & Store Delivery Architecture

Before changing import settings, distinguish between the packaging formats Unity generates and what players actually download from the store.

Monolithic APK vs. Android App Bundle (.aab)

  • APK (Android Package Kit): A single installable archive containing all compiled code (classes.dex, libil2cpp.so, libunity.so), resources, and assets for every enabled CPU architecture (ARMv7 + ARM64) and screen density. Shipping a universal fat APK forces a modern 64-bit phone to download redundant 32-bit native libraries (armeabi-v7a) that it will never execute.
  • AAB (Android App Bundle): A publishing format (Build App Bundle (Google Play) in File > Build Profiles) containing your project's compiled code, resources, and asset modules. When you upload an .aab to Google Play, Google Play's server-side bundletool generates and signs optimized Split APKs tailored to each user's specific device configuration:
    • Base Master APK (base-master.apk): Core manifests and shared resources.
    • ABI Split APK (base-arm64_v8a.apk or base-armeabi_v7a.apk): Only the native .so libraries matching the device's CPU architecture.
    • Density & Language Split APKs: Only the DPI resources and locales matching the device.

Important Note on Google Play Policies & Size Limits: Google Play requires new apps and games to be published as Android App Bundles (.aab) rather than monolithic APKs. Maximum compressed download size limits—including the base module download ceiling, Play Asset Delivery (PAD) install-time, fast-follow, and on-demand asset pack limits, and cellular Over-The-Air (OTA) download warning thresholds—are governed by current Google Play policies and subject to store updates. Always verify current thresholds in the official Google Play App Size & Play Asset Delivery Documentation.

Download Size vs. Installed Size on Disk

Store product pages display Download Size, while device storage settings display Installed Size. They differ for three technical reasons:

MetricWhat It MeasuresKey Unity 6 Settings That Control It
Store Download SizeCompressed over-the-air payload transferred from Google Play (split APKs) or the Apple App Store (.ipa variant).Compression Method (LZ4HC), Managed Stripping Level, IL2CPP Code Generation (Faster (smaller) builds), Texture/Audio Compression, and Addressables / Play Asset Delivery offloading.
Installed Disk SizeTotal flash storage consumed after installation, including extracted native libraries, .dex / OAT compilation artifacts, and cached bundles.Uncompressed asset sizes, Android extractNativeLibs manifest packaging, local Addressables cache settings, and iOS Mach-O executable size.
Runtime Memory (RAM)Active CPU + GPU memory allocated while a scene is running.Hardware texture format (ASTC vs. uncompressed RGBA32), Read/Write Enabled flags, Mipmaps, and deterministic Addressables.Release() calls.

Unity Build Compression: Default vs. LZ4 vs. LZ4HC

In File > Build Profiles > Compression Method, Unity offers three player data compression modes:

  1. Default: On Android, packages uncompressed player data inside the APK/AAB container (which is then compressed at the outer ZIP/deflate container level). This results in slower random-access asset loading from the archive.
  2. LZ4: Compresses player data and scenes into chunk-based LZ4 archives. Unity decompresses individual chunks on the fly in memory as assets are requested, improving startup and scene load times with fast build compilation.
  3. LZ4HC (High Compression): Uses the High-Compression variant of LZ4. It produces a smaller build size than standard LZ4 while preserving the exact same fast runtime decompression performance, making LZ4HC the recommended setting for staging and production store releases.

2. Analyzing the Unity 6 Build Report & Detecting Unused Assets

Never guess which folder is bloating your build. Unity records an exact byte-by-byte inventory every time you build a player.

Method A: Inspecting Editor.log After a Build

Immediately after completing an Android or iOS build, open the Console window menu (⋮) and select Open Editor Log, then search for Build Report. Unity prints two critical tables:

  1. Category Summary: Breaks down uncompressed asset contributions across Textures, Meshes, Animations, Sounds, Shaders, Other Assets, Levels, Scripts, Included DLLs, and File Headers.
  2. Used Assets and files from the Resources folder: Lists every single project asset serialized into the build, sorted from largest to smallest (in KB/MB and percentage).

Method B: Unity Build Report Inspector & BuildReport C# API

In Unity 6, you can install the official Build Report Inspector package (com.unity.build-report-inspector) via the Package Manager to inspect .buildreport files visually in the Editor, or query UnityEditor.Build.Reporting.BuildReport programmatically during CI/CD builds.

Why "Unused" Assets Still End Up in Your Build

Unity's build pipeline automatically walks the dependency graph starting from your enabled scenes and excludes any unreferenced files in regular Assets/ folders. When unused assets inflate your build, they are entering through one of four paths:

  1. Any Resources/ Directory: Every file inside any folder named Resources (including Assets/ThirdPartySDK/Examples/Resources/) is unconditionally baked into the build because Unity cannot statically determine which strings might be passed to Resources.Load(string) at runtime.
  2. Enabled Test or Legacy Scenes in Build Profiles: If a sandbox scene (TestLevel.unity) is left checked in File > Build Profiles > Scene List, every prefab, texture, and audio clip referenced by that scene is packed into the binary.
  3. Direct References on Singleton Managers or ScriptableObjects: A bootstrap GameManager or ItemDatabase ScriptableObject that holds a List<GameObject> of every character skin or level prefab forces all of those assets into the initial build. Replace direct inspector references with AssetReference handles via Unity Addressables.
  4. Assets/StreamingAssets/: Every file inside StreamingAssets is copied verbatim into the build binary without dependency stripping.

Production C# Script: Automated Build Size & Resources/ Auditor

Place the following Editor script inside an Assets/Editor/ folder (BuildSizeReportAuditor.cs). It implements IPostprocessBuildWithReport to automatically log the build's output size, list the top 25 largest packed assets, and flag any assets pulled in from Resources/ folders after every player build:

CSHARP
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine;

namespace MyGame.BuildPipelineTools
{
    /// <summary>
    /// Automatically audits Unity 6 BuildReport data after every build to identify
    /// the largest packed assets and flag unexpected Resources/ folder inclusions.
    /// Place this file inside an Assets/Editor/ directory.
    /// </summary>
    public sealed class BuildSizeReportAuditor : IPostprocessBuildWithReport
    {
        private const int TopAssetsToReport = 25;
        private const long WarningAssetSizeBytes = 2 * 1024 * 1024; // 2 MB threshold

        public int callbackOrder => 100;

        public void OnPostprocessBuild(BuildReport report)
        {
            if (report == null)
            {
                return;
            }

            AuditBuildReport(report);
        }

        private static void AuditBuildReport(BuildReport report)
        {
            BuildSummary summary = report.summary;
            double totalSizeMb = summary.totalSize / (1024.0 * 1024.0);

            var assetSizesByPath = new Dictionary<string, ulong>(StringComparer.OrdinalIgnoreCase);

            foreach (PackedAssets packedArchive in report.packedAssets)
            {
                PackedAssetInfo[] contents = packedArchive.contents;
                if (contents == null)
                {
                    continue;
                }

                for (int i = 0; i < contents.Length; i++)
                {
                    PackedAssetInfo info = contents[i];
                    string path = string.IsNullOrEmpty(info.sourceAssetPath)
                        ? "(Built-in / Generated)"
                        : info.sourceAssetPath;

                    if (assetSizesByPath.TryGetValue(path, out ulong existingBytes))
                    {
                        assetSizesByPath[path] = existingBytes + info.packedSize;
                    }
                    else
                    {
                        assetSizesByPath[path] = info.packedSize;
                    }
                }
            }

            List<KeyValuePair<string, ulong>> sortedAssets = assetSizesByPath
                .OrderByDescending(kvp => kvp.Value)
                .ToList();

            List<KeyValuePair<string, ulong>> resourcesAssets = sortedAssets
                .Where(kvp => kvp.Key.IndexOf("/Resources/", StringComparison.OrdinalIgnoreCase) >= 0)
                .ToList();

            var sb = new StringBuilder(2048);
            sb.AppendLine("==========================================================");
            sb.AppendLine($"[BuildSizeReportAuditor] Platform: {summary.platform} | Result: {summary.result}");
            sb.AppendLine($"Output Path: {summary.outputPath}");
            sb.AppendLine($"Total Build Output Size: {totalSizeMb:F2} MB ({summary.totalSize:N0} bytes)");
            sb.AppendLine($"Build Duration: {summary.totalTime.TotalSeconds:F1}s");
            sb.AppendLine("----------------------------------------------------------");
            sb.AppendLine($"TOP {Mathf.Min(TopAssetsToReport, sortedAssets.Count)} LARGEST PACKED ASSETS:");

            int count = Mathf.Min(TopAssetsToReport, sortedAssets.Count);
            for (int i = 0; i < count; i++)
            {
                var entry = sortedAssets[i];
                double mb = entry.Value / (1024.0 * 1024.0);
                string flag = entry.Value >= WarningAssetSizeBytes ? "[LARGE] " : "";
                sb.AppendLine($"  {i + 1:D2}. {flag}{mb:F2} MB  —  {entry.Key}");
            }

            if (resourcesAssets.Count > 0)
            {
                ulong totalResourcesBytes = 0;
                for (int i = 0; i < resourcesAssets.Count; i++)
                {
                    totalResourcesBytes += resourcesAssets[i].Value;
                }

                double resourcesMb = totalResourcesBytes / (1024.0 * 1024.0);
                sb.AppendLine("----------------------------------------------------------");
                sb.AppendLine($"WARNING: {resourcesAssets.Count} assets packed from /Resources/ folders ({resourcesMb:F2} MB packed):");

                int resCap = Mathf.Min(15, resourcesAssets.Count);
                for (int i = 0; i < resCap; i++)
                {
                    double mb = resourcesAssets[i].Value / (1024.0 * 1024.0);
                    sb.AppendLine($"  * {mb:F2} MB  —  {resourcesAssets[i].Key}");
                }
            }

            sb.AppendLine("==========================================================");
            Debug.Log(sb.ToString());
        }
    }
}
#endif

3. Texture, Audio & Shader Asset Size Reduction

In almost every Unity BuildReport, Textures and AudioClips account for the vast majority of packed asset bytes.

A. Texture Compression (ASTC vs. ETC2), Max Size & Mipmaps

  1. Use Hardware-Native Block Compression (ASTC):
    • In Unity 6, ASTC (Adaptive Scalable Texture Compression) is the standard hardware texture format for both iOS and modern Android devices (OpenGL ES 3.1+ / Vulkan).
    • Never leave textures set to uncompressed RGBA 32 bit or RGB 24 bit. Instead, configure platform-specific overrides on the Texture Importer using block sizes matched to visual importance:
      • ASTC 4x4 or 5x5 blocks: Normal maps, crisp UI gradients, and close-up hero character textures.
      • ASTC 6x6 blocks: Standard 3D environment albedo/metallic/roughness textures and general 2D sprites.
      • ASTC 8x8 or 10x10 blocks: Rough terrain splatmaps, distant background props, and soft particle masks.
  2. Android Texture Compression Targeting:
    • If your Android project must support legacy OpenGL ES 3.0 devices that lack hardware ASTC support alongside modern ASTC devices, use Texture Compression Targeting in your Android App Bundle configuration. This allows Google Play to serve ASTC-compressed asset packs to compatible devices and fallback ETC2 packs only to older hardware—preventing CPU software decompression into RGBA32 RAM at runtime.
  3. Disable Mipmaps on 2D & UI Textures:
    • Enabling Generate Mip Maps adds a pyramid of lower-resolution texture levels (1/4, 1/16, 1/64...) that increases the texture's file size and RAM footprint by approximately 33%. Keep Mipmaps enabled on 3D world geometry (where they improve GPU cache efficiency and prevent aliasing at a distance), and uncheck Generate Mip Maps on all 2D UI sprites, HUD icons, and splash screens.
  4. Right-Size Max Size Per Platform & Pack Sprite Atlases:
    • Audit 4096x4096 and 2048x2048 source textures in the BuildReport. Dropping a background prop texture from 2048x2048 to 1024x1024 reduces its pixel count (and compressed byte size) by 75%.
    • Group UI sprites into Sprite Atlases (SpriteAtlas) with tight packing so padding pixels are minimized and compression blocks align cleanly.
  5. Understand Crunch Compression Tradeoffs:
    • Checking Use Crunch Compression (or selecting a Crunched ETC2 / ASTC override where supported) applies an additional lossy compression pass that reduces download and disk size for textures stored in the APK/AAB or remote AssetBundles.
    • Tradeoff: Crunch compression is lossy (can introduce visible block artifacts on smooth gradients or normal maps), increases build compilation time, and requires the CPU to decompress the crunched data back into the underlying GPU texture format (such as ETC2) when loading the texture into memory. Test visual quality and load-time impact carefully before applying Crunch across UI or normal maps.

B. Audio Compression & Channel Optimization

Raw .wav files imported without appropriate compression settings quietly add tens of megabytes to mobile builds:

Audio Asset CategoryRecommended Load TypeRecommended Compression FormatAdditional Size Optimization
Background Music & Long Ambient Loops (> 5s)StreamingVorbis (Quality 50–70%)Check Force To Mono if stereo panning is subtle on phone speakers (halves channel data).
Medium SFX & Voiceovers (2s – 5s)Compressed In MemoryVorbisCheck Force To Mono and override Sample Rate to 22,050 Hz or 24,000 Hz if high-frequency fidelity is unaffected.
Short, Frequent Combat / UI SFX (< 2s)Decompress On Load (or Compressed In Memory)ADPCMADPCM provides ~3.5x compression vs. raw PCM with minimal CPU decoding cost.Check Force To Mono.

C. Shader Variant Stripping

A single complex shader with multiple multi_compile directives can generate thousands of compiled GPU programs, inflating both build size (shaders in the Build Report) and runtime shader memory:

  1. URP Global Settings & Graphics Settings:
    • In Edit > Project Settings > Graphics and URP Global Settings, enable Strip Unused Variants and uncheck unused Lightmap Modes, Fog Modes, and Debug Display variants.
    • Disable unused features on your shipping URP Asset (such as Additional Light Shadows or Screen Space Shadows if your game does not use them) so URP strips those shader keywords at build time.
  2. Audit Always Included Shaders:
    • Inspect Project Settings > Graphics > Always Included Shaders. Never add heavy uber-shaders (like Universal Render Pipeline/Lit or legacy Standard) to Always Included Shaders, as this forces Unity to compile and bundle every possible keyword combination into the player binary.
  3. Prefer shader_feature Over multi_compile in Custom Shaders:
    • In custom HLSL shaders or Shader Graphs, declare material toggles as shader_feature_local so Unity automatically strips unused keyword combinations that are not enabled on any included Material.

4. Managed Code Stripping, IL2CPP Settings & Engine Code Stripping

On both Android (libil2cpp.so + libunity.so) and iOS (the main Mach-O executable), compiled engine and script code often represents 15 MB to 50+ MB of your build before asset packs are even counted.

A. Managed Stripping Level (UnityLinker)

In Project Settings > Player > Other Settings > Optimization > Managed Stripping Level, Unity's bytecode linker (UnityLinker) analyzes your C# assemblies and removes unreachable types, methods, and fields before IL2CPP translates the IL into C++:

  • Minimal: Strips only unused class libraries while keeping nearly all user and package assemblies intact.
  • Low / Medium / High: Progressively strips unused classes, methods, and properties across third-party packages and user assemblies.
  • Handling Reflection & JSON Deserialization Safely: When raising Managed Stripping Level to Medium or High, classes instantiated strictly via C# reflection (Activator.CreateInstance, dependency injection containers, or reflection-based JSON serializers) may be stripped if no static code calls their constructors. Protect reflected types using either:
    1. The [UnityEngine.Scripting.Preserve] attribute directly on the class or method.
    2. A link.xml file placed anywhere in your Assets/ folder:
XML
<linker>
  <!-- Preserve all types in a specific namespace used for JSON API payloads -->
  <assembly fullname="MyGame.Runtime">
    <namespace fullname="MyGame.Network.Payloads" preserve="all" />
  </assembly>
</linker>

B. IL2CPP Code Generation: Faster (smaller) builds

In Project Settings > Player > Other Settings > Configuration > IL2CPP Code Generation:

  • Faster runtime (Default): Generates specialized C++ code for generic method and type instantiations.
  • Faster (smaller) builds (Optimize Size): Instructs IL2CPP to share generic C++ implementations wherever possible rather than emitting duplicate C++ functions for every generic type permutation. According to Unity 6 documentation on IL2CPP code generation, this setting reduces both build compilation time and final binary size (libil2cpp.so on Android and the iOS executable).

C. Strip Engine Code & Prune Package Manager Dependencies

  • Enable Strip Engine Code: When building with IL2CPP, keep Strip Engine Code checked in Project Settings > Player > Other Settings. Unity analyzes which native C++ engine subsystems your scenes and stripped managed assemblies actually reference, and excludes unused native modules (for example, Physics2D, Terrain, Wind, Cloth, Video, or VR) from the native binary.
  • Audit Packages/manifest.json: Open Window > Package Manager > In Project and remove default packages your game does not use (such as Unity Timeline, Visual Scripting, Terrain Tools, or 2D Tilemap in a pure 3D game).
  • Separate Native Debug Symbols: Never ship unstripped debug symbols inside your store binary. On Android, set Create symbols.zip to Public or Debugging so Unity generates a separate .symbols.zip file for Google Play Console / Firebase Crashlytics upload while keeping the .aab binary stripped. (See our Unity 6 Crash Analytics & IL2CPP Symbolication Guide for symbol upload setup.)

5. Addressables, AssetBundles & Google Play Asset Delivery (PAD)

Once textures, audio, and code stripping are optimized, the only way to reduce the initial store download further is to decouple content from the base binary.

Moving Post-Boot Assets to Unity Addressables

Only assets required for your splash screen, bootstrap initialization, and immediate first-session tutorial need to reside inside the base install binary:

  1. Evacuate Assets/Resources/: Move heavy prefabs, audio tracks, and UI atlases out of Resources/ and mark them Addressable.
  2. Keep Only the Bootstrap Scene in Build Profiles: Instead of listing 50 levels in File > Build Profiles > Scene List, include only your lightweight 00_Bootstrap scene and load gameplay scenes via Addressables.LoadSceneAsync.
  3. Deduplicate Shared Bundle Dependencies: Run Window > Asset Management > Addressables > Analyze > Check Duplicate Bundle Dependencies so shared materials, fonts, and shaders are isolated into a single shared bundle rather than duplicated across multiple level bundles. For complete packing and memory rules, read our Unity Addressables Optimization Guide and Unity Addressables vs. AssetBundles Architecture Guide.

Integrating Google Play Asset Delivery (PAD) or Remote CDN

When delivering large content libraries on Android and iOS, choose between two primary architectures:

  • Google Play Asset Delivery (PAD): Packages Addressables or AssetBundles inside the .aab as modular asset packs hosted by Google Play for free, using three delivery modes:
    • install-time: Installed alongside the base app at download time.
    • fast-follow: Automatically downloaded by Google Play immediately after installation completes (before the user even opens the app).
    • on-demand: Downloaded at runtime when requested by your game code (for example, when entering World 2).
  • Remote CDN Addressables (Android, iOS & WebGL): Hosts LZ4 or LZMA Addressable bundles on a cloud CDN (such as CloudFront, Cloudflare R2, or Google Cloud Storage). This keeps both your Android .aab and iOS .ipa minimal and allows over-the-air content updates without store review. (If you also target browser builds, see our Unity WebGL Performance Guide for Brotli and WebAssembly bundle sizing.)

6. Native SDK / Plugin Auditing & iOS App Thinning Optimization

Auditing Android .aab / .apk Native Plugins with APK Analyzer & bundletool

Third-party ad mediation adapters, analytics SDKs, and native plugins placed in Assets/Plugins/Android/ often bundle .aar or .so libraries for multiple CPU architectures (x86, x86_64, armeabi-v7a, arm64-v8a):

  1. Inspect with Android Studio APK Analyzer: Drag your built .apk or .aab into Android Studio > Build > Analyze APK... to inspect the exact compressed and uncompressed byte contribution of:
    • lib/arm64-v8a/ (libil2cpp.so, libunity.so, and third-party .so plugins)
    • assets/bin/Data/ (Unity scenes, sharedassets, and local Addressable bundles)
    • classes.dex / classes2.dex (Java/Kotlin Android SDK dependencies resolved via External Dependency Manager for Unity / EDM4U)
  2. Measure True Device Download Size with Google's bundletool: Do not judge player download size by the raw file size of your .aab archive on disk (which contains all ABIs and densities). Measure the actual split-APK download size generated for a target device using Google's official bundletool:
BASH
# 1. Generate an .apks archive from your Unity .aab build
bundletool build-apks \
  --bundle=Build/MyGame.aab \
  --output=Build/MyGame.apks \
  --mode=default

# 2. Print the estimated min/max compressed over-the-air download size across device configurations
bundletool get-size total --apks=Build/MyGame.apks

iOS App Size Optimization & Xcode App Thinning Reports

On iOS, the .ipa file uploaded to App Store Connect is an intermediate archive; Apple slices and re-signs variants for each iPhone and iPad model via App Thinning:

  1. Generate an Xcode App Thinning Size Report:
    • Build your Unity iOS project and open Unity-iPhone.xcodeproj / .xcworkspace in Xcode.
    • Select Product > Archive.
    • In the Xcode Organizer, click Distribute App > Ad Hoc (or Development), choose All compatible device variants under App Thinning, and check Rebuild from Bitcode / Strip Swift symbols as applicable.
    • Open the exported folder and inspect App Thinning Size Report.txt, which reports the exact compressed download size and uncompressed install size for every target iPhone and iPad configuration.
  2. Why Executable Code Size Matters Extra on iOS (FairPlay DRM):
    • When the App Store distributes your app, Apple encrypts the __TEXT segment of the Mach-O executable binary with FairPlay DRM. Because encrypted binary data has high entropy, it does not compress as tightly inside the .ipa ZIP container as unencrypted assets.
    • Consequently, reducing executable code size via IL2CPP Code Generation: Faster (smaller) builds, Managed Stripping Level: High, and Strip Engine Code yields an outsized reduction in iOS App Store download size.
  3. Audit iOS Frameworks & Asset Catalogs:
    • Remove unused iOS .framework / .xcframework slices from Assets/Plugins/iOS/ and Podfile dependencies, and ensure simulator architectures (x86_64 / arm64-simulator) are stripped from embedded third-party frameworks during release archiving.

7. Reusable Resource: Unity Build Size Audit Checklist & Measurement Template

Use this Unity Build Size Audit Checklist before every milestone or store submission. You can review it directly below or copy the Markdown version into your GitHub pull request or release ticket.

A. Build Configuration & Code Stripping

  • Compression Method: Set to LZ4HC in File > Build Profiles for staging and production store builds (LZ4 for fast local dev builds).
  • Development Build Disabled: Confirm Development Build, Script Debugging, and Autoconnect Profiler are unchecked for release size measurements.
  • IL2CPP Code Generation: Set to Faster (smaller) builds in Project Settings > Player > Other Settings to minimize generic C++ code expansion.
  • Managed Stripping Level: Configured to Medium or High (with required reflection types protected via [Preserve] or link.xml).
  • Strip Engine Code: Checked in Project Settings > Player > Other Settings so unused native Unity C++ modules are omitted.
  • Debug Symbols Separated: Android Create symbols.zip set to external archive (Debugging / Public) and iOS dSYM generated externally rather than embedded in the shipping binary.

B. Asset Inspection (Textures, Audio, Meshes, Shaders)

  • BuildReport Audited: Top 25 largest assets in Editor.log / BuildSizeReportAuditor reviewed for unexpected inclusions.
  • Platform Texture Compression: All textures use hardware-native compression (ASTC on iOS and modern Android; Texture Compression Targeting enabled if fallback ETC2 is required) with zero uncompressed RGBA32 textures.
  • UI & 2D Mipmaps Disabled: Generate Mip Maps is unchecked on all 2D sprites, UI atlases, and fixed-distance HUD textures (~33% size reduction per texture).
  • Max Texture Size Right-Sized: No mobile prop or UI element ships at 2048x2048 or 4096x4096 unless visually justified on tablet/flagship displays.
  • Audio Load Types & Compression: Music/ambience set to Streaming + Vorbis, short SFX set to ADPCM or Vorbis, and Force To Mono enabled where stereo separation is unnecessary.
  • Shader Variants Stripped: Unused URP features, fog modes, and lightmap modes stripped; no heavy uber-shaders sitting in Always Included Shaders.

C. Package, Resources/ & Native SDK Inspection

  • Assets/Resources/ Evacuated: Zero heavy prefabs, textures, or audio clips remain inside any Resources/ folder (including third-party SDK sample folders).
  • Build Profiles Scene List Pruned: Test scenes, sandbox scenes, and legacy levels unchecked in File > Build Profiles > Scene List.
  • Addressables Duplicate Check Passed: Window > Asset Management > Addressables > Analyze > Check Duplicate Bundle Dependencies reports zero unintentionally duplicated shared assets.
  • Package Manager Pruned: Unused Unity packages removed from Packages/manifest.json.
  • Native Plugins Audited: Android lib/ and classes.dex inspected in APK Analyzer; unused ad mediation adapters or legacy native .so / .framework plugins removed.

D. Android App Bundle (AAB) & iOS Delivery Settings

  • Android App Bundle (.aab) Enabled: Built as .aab (rather than monolithic fat APK) for Google Play, with ARM64 targeted and ABI/density splitting active.
  • Play Asset Delivery / Remote Addressables: Base module and asset packs verified against current Google Play Console size policies.
  • iOS App Thinning Verified: Exported App Thinning Size Report.txt from Xcode Organizer to confirm sliced .ipa download and install sizes across target devices.

E. Copy-Ready Markdown Checklist & Before / After Measurement Template

Click the copy button on the code block below to paste this audit checklist and measurement table directly into your team's GitHub PR, Notion doc, or Jira release ticket:

MARKDOWN
## Unity 6 Build Size Audit & Before/After Sign-Off

- **Project / Commit**: `[e.g., v1.4.0-rc1 / commit abc1234]`
- **Unity Version**: `[e.g., Unity 6000.0.x LTS]`
- **Target Platforms**: `[Android AAB / iOS IPA]`

### 1. Pre-Release Checklist
- [ ] Player Compression Method set to `LZ4HC` (Release build, Development Build OFF)
- [ ] `IL2CPP Code Generation` set to `Faster (smaller) builds`
- [ ] `Managed Stripping Level` set to `Medium` or `High` (`link.xml` verified)
- [ ] `Strip Engine Code` enabled and unused UPM packages removed from `manifest.json`
- [ ] Top 25 assets in `BuildReport` / `Editor.log` audited
- [ ] Zero heavy assets left inside `Assets/Resources/` or third-party sample folders
- [ ] All textures use `ASTC` compression; Mipmaps disabled on 2D/UI sprites
- [ ] Audio clips compressed (`Vorbis` / `ADPCM`) and `Force To Mono` applied where appropriate
- [ ] Addressables `Check Duplicate Bundle Dependencies` rule verified clean
- [ ] Native `.so` / `.dex` / `.framework` sizes verified in APK Analyzer & Xcode App Thinning Report

### 2. Before / After Build Size Measurement Table
*(Record actual measured outputs from your build artifacts—do not estimate)*

| Build Metric | Measurement Tool | Baseline (Before) | Optimized (After) | Delta (MB / %) |
| :--- | :--- | :--- | :--- | :--- |
| **Android `.aab` Total File Size** | File System / CI Artifact | __ MB | __ MB | __ MB (__%) |
| **Android Estimated Store Download Size (`arm64-v8a`)** | `bundletool get-size total` / Play Console | __ MB | __ MB | __ MB (__%) |
| **Android Installed Size on Device** | Android Device Storage Settings | __ MB | __ MB | __ MB (__%) |
| **iOS Compressed Download Size (Sliced Variant)** | Xcode `App Thinning Size Report.txt` | __ MB | __ MB | __ MB (__%) |
| **iOS Uncompressed Install Size (Sliced Variant)** | Xcode `App Thinning Size Report.txt` | __ MB | __ MB | __ MB (__%) |
| **Build Report: Textures Total (Uncompressed)** | `Editor.log` / Build Report Inspector | __ MB | __ MB | __ MB (__%) |
| **Build Report: Audio Total (Uncompressed)** | `Editor.log` / Build Report Inspector | __ MB | __ MB | __ MB (__%) |
| **Build Report: Shaders Total** | `Editor.log` / Build Report Inspector | __ MB | __ MB | __ MB (__%) |
| **Native Binary (`libil2cpp.so` + `libunity.so`)** | Android Studio APK Analyzer | __ MB | __ MB | __ MB (__%) |

8. Build Size Troubleshooting Matrix

Symptom ObservedPrimary Root CauseHow to ConfirmEngineering Fix
Deleting unused textures from Assets/ did not shrink the APK/AABUnity already strips unreferenced assets automatically; the bloat is referenced by an active Scene, Resources/, or StreamingAssets/.Run BuildSizeReportAuditor or check Used Assets in Editor.log.Remove unused scenes from Build Profiles, evacuate Assets/Resources/, and replace direct inspector prefab lists with Addressables AssetReference.
libil2cpp.so or iOS Mach-O binary is unexpectedly hugeIL2CPP Code Generation is set to Faster runtime, Managed Stripping Level is Minimal, or debug symbols are embedded inside the binary.Inspect lib/arm64-v8a/libil2cpp.so in Android Studio APK Analyzer or Xcode archive binary.Switch IL2CPP Code Generation to Faster (smaller) builds, raise Managed Stripping Level to Medium/High, enable Strip Engine Code, and export symbols to an external .symbols.zip.
Addressable AssetBundles total size is 2x–3x larger than raw source assetsNon-Addressable shared textures/materials are referenced by prefabs in multiple Addressable groups and duplicated into every bundle.Run Addressables > Analyze > Check Duplicate Bundle Dependencies.Move shared textures, materials, and shaders into a dedicated Shared Addressable Group and set bundle compression to LZ4 / LZ4HC.
Build takes 20+ minutes in CI/CD during shader compilation and shaders size is largeHeavy uber-shaders are listed in Always Included Shaders or unused URP shadow/fog/lightmap keywords are not stripped.Search Editor.log for Compiling shader variant counts.Remove uber-shaders from Always Included Shaders, enable Strip Unused Variants in URP Global Settings, and strip unused fog/lightmap modes in Project Settings > Graphics.
Runtime MissingMethodException after enabling Managed Stripping Level: HighUnityLinker stripped a class or constructor invoked only via C# reflection or JSON deserialization.Check device logcat / Xcode console stack trace for the missing type name.Add [Preserve] (UnityEngine.Scripting.PreserveAttribute) to the target class or register the namespace in Assets/link.xml.
iOS App Store download size is much larger than Android Play Store download sizeFairPlay DRM encrypts the iOS Mach-O __TEXT executable segment, preventing standard ZIP compression on the code binary, or 2D/UI textures have Mipmaps enabled.Inspect App Thinning Size Report.txt and compare executable size vs. asset catalog size.Enable IL2CPP Code Generation: Faster (smaller) builds, enable Strip Engine Code, and audit BuildReport for uncompressed audio or unnecessary mipmaps.

Frequently Asked Questions


Official Unity 6 & Platform Documentation References

Need help reducing your Unity build size, migrating to Addressables, or configuring Play Asset Delivery? Let's review your project architecture.

Share this article

Get Practical Unity Development Insights

Technical guides on Unity performance, AI gameplay systems, mobile monetization, and game development.

Unsubscribe at any time. Your data is never shared.

Recommended Reading

More articles in Unity 6