Search Issue Tracker
Fixed in 2021.2.X
Duplicate in 2021.3.X
Votes
4
Found in
2021.1.0a8
2021.1.0f1
2021.2
Issue ID
1325047
Regression
Yes
A false pop-up appears when modifying a script and having Recompile After Finished Playing set
How to reproduce:
1. Open the attached "1325047.zip" project
2. Open the Sample Scene
3. Go File -> Preferences -> General -> Script Changes While Playing and set "Recompile After Finished Playing"
4. Enter the Play Mode
5. Open the "script.cs" script
6. Modify the script and save it
7. Go back to the Editor
Expected results: No pop-ups appear
Actual results: A "Recompiling Scripts" pop-up appears
Reproducible with: 2021.1.0a8, 2021.1.3f1, 2021.2.0a13
Not reproducible with: 2018.4.34f1, 2019.4.23f1, 2020.3.4f1, 2021.1.0a7
-
stonstad
Mar 10, 2022 20:48
What is the delay in fixing this issue? Every time I change external code Unity reloads scripts -- and I have explicitly told the editor NOT to.
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
- Lighting Data asset is not created when baking multiple Scenes at the same time
- Performance issues when instantiating a recognizer under UnityEngine.Windows.Speech
- Build fails with "Exception: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 0 failed ones" when building the project for iOS
- [Android] .aab Build fails when using Asset Bundles
- Builds fail without a useful error message when building a project with invalid product name
Resolution Note (fix version 2021.2):
We are simplify the option to either allow auto-refresh during playmode or not. Reasoning is that there are two use cases for this: Artist who want to allow refresh during playmode so that he can go tweak textures in photoshop and see change when he switches back. Coder who either like to do the same (ie. change code and go back to see the changes) or like to change code without unity compiling/domain-reload when he re-focus the editor (instead prefers to press ctrl+r himself). The case we are removing is where switching back to the editor can refresh non-scripts, but script changes are handled after the user goes out of playmode. That case was really not aligned with how we reflect state from disk into the editor and is currently broken.