Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2018.4.X, 2019.2.X, 2019.3.X
Default Quality Settings are deleted after Creating a Scriptable object in [InitializeOnLoad] class then entering a Play Mode
How to reproduce:
1. Open the attached "QualitySettingsResetRepro.zip" Project
2. Open the "QualitySettings.asset" in the "New Unity Project(11)" > ProjectSettings folder and scroll down all the way to the bottom
3. Observe all the Platform Quality set to 5 (Ultra)
4. Right click on the "InitializeOnLoad.cs" in the Project View and click "Reimport"
5. Enter Play Mode
6. Observe the "QualitySettings.asset" default Platform Quality Settings
Expected Behavior: Default Quality Settings are not changed
Actual Behavior: Default Quality Settings are deleted and if you reload the project the Default Quality settings will be set to low in the ProjectSettings window
Reproducible with: 2017.4.23f1, 2018.3.9f1, 2019.1.0b7, 2019.2.0a8
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Resolution Note (fix version 2020.1):
When entering play mode we strip quality settings that are not used for the current configuration. This matches what is seen in the player built with the current build settings. When calling AssetDatabase.SaveAssets(); it will save the current state which will override the data in the project files to be the stripped quality settings. We recommend not calling AssetDatabase.SaveAssets(); in IntializeOnLoad.