Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

Discussion in '2020.2 Beta' started by brian-taylor, Jul 23, 2020.

  1. brian-taylor

    brian-taylor

    Unity Technologies

    Joined:
    Aug 2, 2019
    Posts:
    9
    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:

    1. Make a build as normal, IL2CPP will convert your compiled assemblies to C++ and compile the generated code to C++
    2. Make changes to your project that DO NOT involve changing or recompiling any code (changes to materials, shaders, prefabs, etc.)
    3. 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!
     
    Last edited: Jul 23, 2020
  2. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,478
    Zero script change = no rebuilds
    Very nice! Thanks for making this possible
     
  3. billykater

    billykater

    Joined:
    Mar 12, 2011
    Posts:
    328
    @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.
     
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    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.
     
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,478
    You can already test it in 2020.2.a18
     
  6. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,512
    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.
     
  7. GroovyGregory

    GroovyGregory

    Joined:
    Apr 14, 2021
    Posts:
    2
    @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.

    Code (JavaScript):
    1. {
    2.   "dependencies": {
    3.     "com.ptc.vuforia.engine": "git+https://git-packages.developer.vuforia.com#9.8.8",
    4.     "com.unity.addressables": "1.16.19",
    5.     "com.unity.collab-proxy": "1.3.9",
    6.     "com.unity.ide.rider": "2.0.7",
    7.     "com.unity.ide.visualstudio": "2.0.7",
    8.     "com.unity.ide.vscode": "1.2.3",
    9.     "com.unity.mobile.android-logcat": "1.2.2",
    10.     "com.unity.render-pipelines.universal": "10.5.0",
    11.     "com.unity.test-framework": "1.1.24",
    12.     "com.unity.textmeshpro": "3.0.4",
    13.     "com.unity.timeline": "1.4.7",
    14.     "com.unity.ugui": "1.0.0",
    15.     "com.unity.xr.arcore": "4.1.7",
    16.     "com.unity.xr.arfoundation": "4.1.7",
    17.     "edu.inka.cms": "file:../../CMS/cms-package",
    18.     "com.unity.modules.ai": "1.0.0",
    19.     "com.unity.modules.androidjni": "1.0.0",
    20.     "com.unity.modules.animation": "1.0.0",
    21.     "com.unity.modules.assetbundle": "1.0.0",
    22.     "com.unity.modules.audio": "1.0.0",
    23.     "com.unity.modules.cloth": "1.0.0",
    24.     "com.unity.modules.director": "1.0.0",
    25.     "com.unity.modules.imageconversion": "1.0.0",
    26.     "com.unity.modules.imgui": "1.0.0",
    27.     "com.unity.modules.jsonserialize": "1.0.0",
    28.     "com.unity.modules.particlesystem": "1.0.0",
    29.     "com.unity.modules.physics": "1.0.0",
    30.     "com.unity.modules.physics2d": "1.0.0",
    31.     "com.unity.modules.screencapture": "1.0.0",
    32.     "com.unity.modules.terrain": "1.0.0",
    33.     "com.unity.modules.terrainphysics": "1.0.0",
    34.     "com.unity.modules.tilemap": "1.0.0",
    35.     "com.unity.modules.ui": "1.0.0",
    36.     "com.unity.modules.uielements": "1.0.0",
    37.     "com.unity.modules.umbra": "1.0.0",
    38.     "com.unity.modules.unityanalytics": "1.0.0",
    39.     "com.unity.modules.unitywebrequest": "1.0.0",
    40.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    41.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    42.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    43.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    44.     "com.unity.modules.vehicles": "1.0.0",
    45.     "com.unity.modules.video": "1.0.0",
    46.     "com.unity.modules.vr": "1.0.0",
    47.     "com.unity.modules.wind": "1.0.0",
    48.     "com.unity.modules.xr": "1.0.0"
    49.   },
    50.   "scopedRegistries": [
    51.     {
    52.       "name": "package.openupm.com",
    53.       "url": "https://package.openupm.com",
    54.       "scopes": [
    55.         "com.jeffcampbellmakesgames.semver",
    56.         "com.openupm",
    57.         "games.artees.semver"
    58.       ]
    59.     }
    60.   ]
    61. }
    62.  
    Thanks for your help!