Search Issue Tracker
By Design
Votes
0
Found in
2018.2.8f1
Issue ID
1082013
Regression
No
Refreshing an asset forces scripts to recompile during play mode, even if they are set to recompile only after play mode
Steps to reproduce:
1. Create a new project
2. In Preferences, set "Script changes while Playing" to "Recompile after finished playing"
3. Create a new script and attach it to any gameobject
4. Create a new text file
5. Enter play mode
6. Edit the script in a code editor
7. Edit the other created file
8. Refocus the editor
Expected result: other file updates, script does not
Actual result: other file updates causing the scripts to recompile
Reproduced on 2018.2.0a4, 2018.2.15f1, 2018.3.0b8, 2019.3.0a7
Feature introduced in 2018.2.0a4
Notes:
- this behavior has sometimes led to crashes on the user's end, but I was unable to reproduce that.
Comments (1)
-
Zenix
Dec 10, 2018 05:20
Unity needs to add a new issue tracker state, "Broken by Design".
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
If both a script and a non-script asset are modified, then the reimport requires a script recompilation. This is because scripts can affect how assets are imported, and Unity doesn't know whether the script changes are important until it does the recompilation. So the current behaviour is by design, and can be avoided by only changing script assets OR non-script assets during play mode, but not both at the same time.