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
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
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.