Diagram · The IL2CPP settings that trade build time against runtime
Diagram · The IL2CPP settings that trade build time against runtime View full-size figure

Separate the two kinds of time

When a build is long, the long part is one of two stages: converting C# into C++, or compiling and linking that C++. Check the log to see which. A long conversion points at code volume and generic usage; a long compile points at compiler settings.

Values you can lower safely

None of these change how the shipped build behaves.

  1. Keep the C++ compiler configuration on debug during development. Linking is faster.
  2. Do not wipe the incremental build cache. Wiping it means starting from scratch every time.
  3. Build one target architecture during development. Two of them is twice the work.

Stripping is a different animal

Raising Managed Stripping Level shrinks the build and shortens the time, and it also removes types only reached through reflection. That does not reproduce in the Editor, because the Editor does not strip. The exception arrives on device, the first time that code path runs.

ManagedStrippingLevel: High

// The shape you only see on device
System.TypeLoadException: Could not resolve type
  at UnityEngine.JsonUtility.FromJson[T](System.String json)

How to keep the types that vanish

Preserve types the stripper cannot see referenced from code.

<linker>
  <assembly fullname="Assembly-CSharp">
    <type fullname="IceBreaker.Save.SaveDataV2" preserve="all" />
  </assembly>
</linker>

Expected result and next step

If you can name which stage was long and you ran a stripped build on device, this stage is done. Build cache in CI is next: without it, every improvement above disappears on the build machine.

Verification scope

Official documentation review

Verified

Reviewed the article's code and procedure against official Unity documentation and marked it ready for publication. This is not a claim of an independent Unity project or device reproduction; version- or device-specific reports will be checked in that environment as follow-up.

Official documentation checkedScripting backends ↗