Speeding Up IL2CPP Build Times in Unity
IL2CPP builds can eat your afternoon. A handful of Player Settings, a protected build cache, and a smarter daily workflow can turn a long wait into a coffee break.

To cut Unity IL2CPP build time, keep the Library folder and its build cache between builds, build one CPU architecture during development, set the C++ Compiler Configuration to Debug for test builds, and exclude your project from antivirus scanning. For quick checks, use Mono or a scripts-only build, and save full IL2CPP release builds for when they matter.
Why IL2CPP builds take so long
IL2CPP converts your compiled C# into C++ and then compiles that C++ with a native toolchain. Two full compile steps, over every assembly in the project, including packages.
That second step is where the time goes. Native compilers are thorough, and a mid-sized mobile project produces a lot of generated C++.
The good news is that most of the slowness comes from settings and habits, not from your code. You can fix most of it in an afternoon.
Check these Player Settings first
Open Edit > Project Settings > Player and look under Other Settings, in the Configuration section.
| Setting | For dev builds | For release builds | Effect on build time |
|---|---|---|---|
| C++ Compiler Configuration | Debug | Release or Master | Debug compiles fastest |
| IL2CPP Code Generation | Faster (smaller) builds | Faster runtime | Smaller option generates less code |
| Target Architectures (Android) | ARM64 only | ARMv7 and ARM64 if needed | One architecture halves native work |
| Managed Stripping Level | Low or Minimal | Your release choice | Mostly affects size, small time gain |
The exact location of the code generation option has moved between Unity versions, so if you do not see it in Player Settings, check the Build Settings window.
Master configuration gives the most optimised output but is slowest to compile. There is no reason to wait for it on a build you only want to test a menu in.
Protect your build cache
IL2CPP and the build pipeline cache their work inside the Library folder. A warm cache means the next build only recompiles what changed.
- Do not delete Library as a reflex fix. It forces a full cold build and a full asset reimport.
- Avoid clean builds unless you are chasing a genuine cache bug.
- Keep one project per build target if you switch platforms often. Switching back and forth can invalidate cached work.
If you run builds on CI, cache the Library folder between runs. Our post on automated builds for a one-person team shows a setup that does this.
Exclude the project from antivirus
Real-time scanning inspects every file IL2CPP writes, and it writes thousands. On Windows, adding exclusions can make a noticeable difference.
Unity's own documentation suggests excluding the project folder and the Unity install from scanning. Add your project path and the editor folder in Windows Security, under virus and threat protection settings.
Only exclude folders you trust, and keep the rest of your system protected.
Script the dev and release settings
Switching settings by hand is how release builds go out with Debug configuration. Put both profiles in an editor script.
using UnityEditor;
using UnityEditor.Build;
public static class BuildProfiles
{
[MenuItem("Build/Use Dev IL2CPP Settings")]
static void Dev()
{
var target = NamedBuildTarget.Android;
PlayerSettings.SetIl2CppCompilerConfiguration(target, Il2CppCompilerConfiguration.Debug);
PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64;
}
[MenuItem("Build/Use Release IL2CPP Settings")]
static void Release()
{
var target = NamedBuildTarget.Android;
PlayerSettings.SetIl2CppCompilerConfiguration(target, Il2CppCompilerConfiguration.Release);
PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64 | AndroidArchitecture.ARMv7;
}
}
API names shift a little between Unity versions, so check your editor's script reference if one of these calls does not compile. On Unity 6, Build Profiles can hold separate settings per profile, which does the same job without a script.
Change the daily workflow
The fastest IL2CPP build is the one you skip.
- Iterate in the editor for logic and feel. Most bugs never need a device.
- Use Mono for Android dev builds when you are testing gameplay rather than platform behaviour. Mono builds are far quicker. Mono on Android only targets 32-bit ARM, so keep an older test phone handy, since some newer devices run 64-bit apps only. iOS always needs IL2CPP.
- Use scripts-only builds. With Development Build ticked, the Build Settings window offers a scripts-only option that skips the asset processing when only code changed.
- Batch device tests. Build once, test several changes, rather than building per change.
- Run full release builds overnight or on CI, not while you wait.
Treat IL2CPP release builds as a pipeline job, not a step in your edit loop. Your loop should be editor, then Mono or scripts-only, then IL2CPP when it matters.
Hardware still matters
The native compile runs in parallel across CPU cores. More cores and a fast NVMe SSD make a real difference, and a project sitting on a spinning disk or a network drive will always be slow.
If you have an older laptop, a modest desktop used only as a build machine can pay for itself in saved hours. A cheap cloud runner works too, as long as it keeps the cache between runs.
Watch for things that make it worse
- Huge generated code from heavy generic use or code generators.
- Packages you imported once and never removed. They still get compiled.
- Plugins that force a full rebuild on every change.
Run a quick audit of your packages every few months. Removing unused ones helps both build time and your final build size.
What we would do
We would set up two scripted profiles on day one: Debug and ARM64 only for testing, Release with all needed architectures for shipping. We would exclude the project from antivirus, never delete Library without a reason, and cache it on CI.
Day to day we would stay in the editor and Mono as long as possible. Full IL2CPP builds go to the build machine, so nobody sits and watches a progress bar.
The short version
- Use Debug compiler configuration and a single architecture for dev builds.
- Keep the Library folder and cache it on CI. Clean builds are a last resort.
- Exclude the project and editor folders from antivirus scanning.
- Script your dev and release settings so they never get mixed up.
- Iterate in the editor and Mono, and push full IL2CPP builds to a build machine.
If build pipelines are eating your week, we are happy to compare notes.
Related reading: Unity mobile performance on low-end Android, Free tools solo devs use to ship faster
Got a game idea? We build it.
You bring the concept. We design, build, test and launch it, and you own 100% of the finished game.
Share Your Game Idea →