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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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.