Search Unity

Feedback Unity 2019.2.7f2 - Compiles every time exit Play

Discussion in 'Editor & General Support' started by WildStyle69, Oct 1, 2019.

  1. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Hello,

    Getting this problem every time I exit play - Unity 2019.2.7f2 seems to be recompiling my code, even if I haven't touched any code files. The progress spinner (bottom right) spins and editor locks up, same as doing a normal code recompile.

    Anyone else having this issue? Bit of a pain for the workflow.. ironic considering this release is supposed to be faster with multi-scene setups.

    // WildStyle
     
  2. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Also started to randomly see scenes marked as dirty / need saving, even when I haven't touched anything.

    And having to do a double save sometimes.. hit the save button it saves, but the scene still has the asterisk, save again and then it's gone.

    // WildStyle
     
  3. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    So no-one else has experienced this before? I'm wondering what's gone wrong to make this happen all the time.. as nothing has changed in my project apart from the Unity upgrade.

    I've checked all preferences and don't see a way to stop the recompile happening every time.

    // WildStyle
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,293
    Please file a bug report so we can look into it.
     
    WildStyle69 likes this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Perhaps related to the "Script Changes While Playing" setting in the Preferences window? It should only compile if script changes were detected though, but perhaps that option is somehow part of the problem.

    upload_2019-10-3_7-40-39.png

    Perhaps an AssetPostprocessor or another tool that runs on scripts and triggers a recompile?

    I've seen this too (2018.4.4f1), mostly when working in the PrefabStage with uGUI. I haven't figured out why this happens, I believe it's related to UI layout Components.
     
    karl_jones and WildStyle69 like this.
  6. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks guys - I'll check further and file a bug report later today.

    // WildStyle
     
  7. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks -- agree that it seems UI related. First saw this problem after integrating TextMesh Pro so that's the main suspect for me right now.

    However, am now seeing other scenes randomly go dirty too, which is new.

    // WildStyle
     
  8. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    • Rolled back to Unity 2019.2.6f1 and it's fine again now.
    • Also tested Unity 2019.2.8f1 had the same issue.
    • Tested with only one scene open and get the same behavior.
    • Still trying to track it down, then will report a bug.

    // WildStyle
     
    karl_jones and Peter77 like this.
  9. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Still haven't found the root cause for this.. tested with Unity 2019.2.12f1 last night and got the same issue.

    My main project is huge so it's pretty difficult to find the culprit. I'm using source control (Git), and even though the scripts seem to recompile every time I leave play, nothing is marked as changed in Git. So it's difficult to know where the problem originates.

    Not sure if you guys know another way, to find out what is triggering the recompile every time?

    // WildStyle
     
  10. villevli

    villevli

    Joined:
    Jan 19, 2016
    Posts:
    89
    You could try looking from the Editor.log (Open from Console window context menu).
    You should see
    Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll
    and a few lines before that should be lines similar to
    Updating Assets/Scripts/SomeScript.cs
    which may show which files caused the recompilation
     
    Peter77 and WildStyle69 like this.
  11. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks @villevli -- I'll give this a try!

    // WildStyle
     
  12. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    That helped me find the cause, thanks much for the pointer!

    Turns out the issue was not a script changing at all, however an asset was updating the Scripting Define Symbols and that was causing the recompile every time I left play.

    // WildStyle
     
    Peter77 likes this.