Search Issue Tracker
By Design
Votes
0
Found in
2019.2.0a12
2019.3.3f1
2019.4
2020.1
2020.2
Issue ID
1240209
Regression
Yes
EditorApplication.isCompiling is not called when the scripts are recompiled upon refocusing the Editor with ADBv2
How to reproduce:
1. Open user-submitted project (isCompilingBug.zip)
2. Open the TestScript.cs with Rider IDE
3. Make some changes to the script and save it
4. Note that while the scripts are compiling in the background, EditorApplication.isCompiling is called
5. Make some changes to the script again, but DON'T save it
6. Refocus the Unity Editor(scripts will start compiling due to Rider's auto-save feature) and see the Console window
Expected result: EditorApplication.isCompiling gets called
Actual result: EditorApplication.isCompiling does not get called
Reproducible with: 2019.2.0a12, 2019.4.0f1, 2020.1.0b11, 2020.2.0a13
Not reproducible with: 2018.4.23f1, 2019.2.0a11
Notes:
Tested with ADBV2(2019.2 and newer)
The issue does not occur when the scripts are compiling in the background(Editor is unfocused)
The issue occurs when the scripts are compiling upon refocusing the Editor(also can be achieved by editing the script in Notepad/Text Editor)
The issue also occurs when the script is saved and the Editor is immediately refocused(e.g. when using CMD+S and ALT+TAB shortcuts)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Compilation for projects with lots of Shaders can be slow (i.e. VFX Graph asset heavy projects)
- Crash on RebuildTransformHierarchyOrMarkForDestruction when opening a scene
- The Editor hangs when opening a project that uses local packages and Version Control
- Area Light is culled when Camera Frustrum is outside the lights range
- The characters of the bottom option in the Scene View Debug Draw Mode dropdown menu are cut off
Resolution Note:
Synchronous compilation is enforced by ADBV2 to prevent inderterministic results.
If Script compilation begins asynchronously and takes some time to complete, assets could be modified while compilation happens, thus resulting in an indeterministic import state.
Auto-refresh is generally responsible for synchronous compilation. Alternatively, Auto-Refresh can be turned off in the preferences window.
To figure out when compilation is happening using the messages for compilationStarted/compilationFinished would be a better approach.