PlayerPrefs.DeleteAll() changes resolution setting? Looks like a unity bug

Hello everyone!

I am testing my game, and added PlayerPrefs.DeleteAll() in the Awake function, just to remove all saved data, for testing purposes…
For example I will test if levels are getting unlocked if previous level is completed and so on…
As I open the build, I see resolution blurry, in every scene I didn’t get the resolution I had.
Resolution I mean GUITexture (fullscreen background Image) and every other GUITexture I am using.
I tried to build it again and again, and still I am getting this blurry resolution.

As I concluded, PlayerPrefs had saved the resolution settings or import settings of textures, and with PlayerPrefs.DeleteAll(), they are gone/deleted…
But it has nothing to do with that, it is strage and as I concluded it is a unity bug.

Has someone experienced this before?

Well it happened to me once, and the way I fixed it is like this:

Go to player settings → Resolution and Presentation → Display Resolution Dialog.

Enable it then build then disable it. That should fix it.

Hope that helps

The idea is that the resolution is set within our PlayerPrefs then used later.
You can also force the resolution you want with Screen.SetResolution.

Player Pref’s resolution (last used resolution) is stronger than the Player Settings resolution (that would be the first used resolution, if you don’t use the dialog)

Uhm, PlayerPrefs are ment to save and load Preferences for the Player. The resolution setting is also a preference.