0-Change Rebuilds in IL2CPP - Now available in Unity 2020.2.0a18

We’ve just landed a new feature for IL2CPP in Unity 2020.2.0a18, 0-change rebuilds! We’re happy to invite you all to try out this new feature, and we would love any feedback!

We need to come up with a better name for this feature, since the actual functionality ensures that “0-change rebuilds” will not actually happen!

Starting in Unity 2020.2.0a18, builds that target an IL2CPP platform will automatically make use of this new feature:

  • Make a build as normal, IL2CPP will convert your compiled assemblies to C++ and compile the generated code to C++
  • Make changes to your project that DO NOT involve changing or recompiling any code (changes to materials, shaders, prefabs, etc.)
  • Make another build, and notice that IL2CPP and native binary compilation will be skipped entirely, since no code has changed since the last build

Unnecessarily reconverting and recompiling code has been a major pain point for many users, especially those working primarily with art and asset pipelines, and also for users that need to do frequent deploys of their builds to test on actual devices, such as iOS and Android.

We hope that this feature can improve everyone’s workflow, and is the first bit to be released of several in-progress and planned features aimed at improving the workflow and iteration time of developing in Unity.

Thank you!

23 Likes

Zero script change = no rebuilds
Very nice! Thanks for making this possible

@brian-taylor
Any more detailed information about how this is achieved? Specifically which files / directories it uses to determine if it needs to recompile?
We are currently evaluating a certain platform’s patching abilities and from what we could find up till now we are producing a 50mb native binary that always trips up the patch generation even if nothing changes. If we could save the data we might be able to reduce the overhead for content only changes and also allow this to work with CI agents. I am fully aware that this is misusing this feature but reducing the workload when there are 9+ targets to build is sometimes worth the effort to build a custom solution.

Great news. Will it only work if no script change happened at all or can it still improve build time by only recompiling the necessary bits? (Or was this happening already?)

I would gladly love to test this feature, if only not for the IL2CPP compile issue with Rewired Plugin.

You can already test it in 2020.2.a18

Probably with empty test project, but not with my current project where il2cpp build issue exists with Rewired plugin. I am already using a18, but all il2cpp build fails to run with il2cpp build + Rewired Plugin. I want to test it in real project I am running.

@brian-taylor

This does not seem to work in my project in Unity 2020.3.8f1. It is always running “Building native binary with IL2CPP” for my Android builds.

I have these packages installed.

{
  "dependencies": {
    "com.ptc.vuforia.engine": "git+https://git-packages.developer.vuforia.com#9.8.8",
    "com.unity.addressables": "1.16.19",
    "com.unity.collab-proxy": "1.3.9",
    "com.unity.ide.rider": "2.0.7",
    "com.unity.ide.visualstudio": "2.0.7",
    "com.unity.ide.vscode": "1.2.3",
    "com.unity.mobile.android-logcat": "1.2.2",
    "com.unity.render-pipelines.universal": "10.5.0",
    "com.unity.test-framework": "1.1.24",
    "com.unity.textmeshpro": "3.0.4",
    "com.unity.timeline": "1.4.7",
    "com.unity.ugui": "1.0.0",
    "com.unity.xr.arcore": "4.1.7",
    "com.unity.xr.arfoundation": "4.1.7",
    "edu.inka.cms": "file:../../CMS/cms-package",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.androidjni": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
  },
  "scopedRegistries": [
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.jeffcampbellmakesgames.semver",
        "com.openupm",
        "games.artees.semver"
      ]
    }
  ]
}

Thanks for your help!