Search Unity

All script assemblies are always recompiled on project start-up (Desktop and CI)

Discussion in 'Linux' started by NoTuxNoBux, Oct 18, 2021.

  1. NoTuxNoBux

    NoTuxNoBux

    Joined:
    Oct 2, 2020
    Posts:
    34
    When starting a Unity 2020.3.15f project on Linux, both locally on my GNOME desktop, as well as in CI using GameCI's container images on GitLab CI, all my scripts appear to always be recompiled on startup. I always see this in the Editor log:

    Code (CSharp):
    1.  
    2. [ScriptCompilation] Recompiling all scripts because: InitialRefresh: Cached user assemblies were invalid
    3. - Starting script compilation
    4.  
    After this it proceeds to recompile all assemblies ("DLLs"), including my main Scripts assembly, which takes around 12 seconds in my small-size project every time. In CI, it eats up around 90 seconds every time (and I currently need to invoke Unity twice there to get NuGetForUnity to restore its packages properly).

    I also see this behavior in GitLab CI, even in cases where a single job is invoking Unity twice, which is slowing down the pipeline.

    (This behaviour may also occur on Windows and macOS, I have not tested this.)
     
    kato_unity45 likes this.
  2. negidevelop

    negidevelop

    Joined:
    Mar 6, 2019
    Posts:
    1
    Unity2020.3.1
    I'm having the same problem with my project.
    When I start Unity, it recompiles all assemblies.
    Do I need to do this every time?
    Is there any way to avoid this?
     
    kato_unity45 likes this.
  3. Soundguy

    Soundguy

    Joined:
    Oct 30, 2009
    Posts:
    49
    I'm having the same issue with my project. it imports everything everytime i load the editor - even when nothing was changed.
     
  4. FictiveDev

    FictiveDev

    Joined:
    Aug 14, 2019
    Posts:
    6
    I seem to have the same issue as well, any news?