Scene Corruption with Runtime Quality Level Change in 5.2

Hi all. I recently upgraded my project to Unity 5.2, and implemented a slider bar to change the quality settings level at runtime (integer only, range 0 to 5).

When I drag the bar in the built WebPlayer, the whole scene gets corrupted. Textures change, I start getting error messages, etc. As long as you don’t touch that slider, it’s fine - as soon as you drag that bar, things explode.

Unfortunately, if you drag the bar inside of Unity, it corrupts the project, and you must restore from backup.

I found this out after having to restore from backup 2 times in 2 days.

Could someone at Unity please look into why calling “Quality.SetQualityLevel” at runtime is corrupting projects? I was calling it with ‘true’ to get expensive changes applied.

Can you report the bug via the bug reporter and post the case NR here?
That would be nice.
Do you got any logs from the editor or the build version?

1 Like

I posted it to the bug reporter as a private case, since I hope to release it to the app stores, and included the .unity3d file. I stored a copy of the webplayer that was built just before the scene got corrupt, and what button I pressed. I don’t have original source code to send them, because everything became corrupted and I had to restore from backup. I’m sure Unity must have tools to examine/extract it.

When the scene became corrupted during gameplay at runtime, I thought ‘That’s weird, oh well’ I didn’t become concerned until I stopped the scene, got a script to build 5 targets going, and alt-tabbed away to do some other work. Unity crashed during the build, and when it came up, it was spewing errors about bad prefabs, geometry being clipped to 512x512, asking about “” objects. The more I touched it, the more it crumbled in my hands. I finally had to delete it and restore from backup. (Thanks Visual Studio Online!)

I think that doing a build right after getting that runtime corruption bit, is what caused it. How, I don’t know. I’m guessing there’s probably only one safe time to change quality level, that is not documented in the Unity documentation.