Search Issue Tracker
By Design
Votes
1
Found in
2020.3
2020.3.18f1
2021.2
2022.1
Issue ID
1365046
Regression
No
Packages keeps getting recompiled when editor is recompiling code from the assets folder.
Reproduction steps:
1. Open user-submitted project "Recompilation Test"
2. Create a new C# Script in the Assets folder
3. Inspect the Logged Compilation time in the Console
4. Navigate to Window -> Package Manager
5. Enable all Built-in packages
6. Create a new C# Script in the Assets folder
7. Inspect the Logged Compilation time in the Console
Expected result: The compilation time before and after adding packages were the same
Actual result: Compilation time was higher after enabling built-in packages
Reproducible with: 2020.3.24f1, 2021.2.6f1, 2022.1.0b2
Could not test with: 2019.4.33f1 (Compilation errors)
Note: Such increase in script compilation time is not seen in Editor Iteration Profiler
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
- Crash on GetSpriteAtlasDependenciesFromBinary when opening specific project
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
Resolution Note:
The way the timings are done here is including domain reload timings.
Domain reload timings are dependent on what code that is loaded into the domain, some code in a package can have some initialization code that will increase the domain reload time.
To get a picture of what is happening its possible to profile the code, using the Unity Profiler, or the Editor Iteration Profiler.
Alternatively there's even https://docs.unity3d.com/ScriptReference/Compilation.CompilationPipeline.html that can be used with a StopWatch to get timings.