I've managed to get an Android build of my Tower Defence game and it's now running swimmingly. My only snag is I wanted to put in an options slider to change the quality levels in the options, so you can scale the performance manually.
I have used QualitySettings.SetQualityLevel.
It is working great but there is a slight snag .. on my android device the two higher quality settings cause the display to become completely garbled (I suspect it is due to the anti aliasing switching on). This in itself isn't a showstopper, as you would think you would just quit the game and restart. However the problem is is that unity is automatically saving the quality settings on exit, so when you restart the game it again comes out garbled and you can't get to change it back. Much like setting a mobile phone to arabic.
I figured out you can clear out these settings in Android in the settings->app->clear app data, but obviously I don't want users to do this.
I can think of a few solutions:
- Always set the game to lowest quality on startup.
- Record the unity decided best settings on first run, and reset this before quitting each time.
- Somehow prevent unity saving the quality settings
- Set the actual options themselves (e.g. shadow distance etc) rather than use the in built quality settings (this may not get persisted)
- Use a system like windows, have the user confirm the new mode by clicking 'yes' within 15 seconds or reverting to previous mode
Has anyone come across this problem, any solutions?