- Home /
Question by
mr_freedo · Aug 30, 2015 at 05:49 PM ·
scriptingbasicsscene-changequalitysettings
Changing quality setting on all scenes
I am making a game where I have an options menu in a separate class. I want the player to be able change the quality settings in game, so I use a toggle group and this line of code: QualitySettings.currentLevel = QualityLevel.Fastest;
My problem is that when i change scene back to the game, the quality settings reset. Anny idea how to do this? I've tried to add: DontDestroyOnLoad(transform.gameObject);
Now when I go back to the game the setting stay the same, but when I reopen the class to change something else, it resets.
Thanks
Comment
Answer by JamesBrodski · May 20, 2016 at 08:00 AM
I had the same problem, you need to turn it into a variable.
#pragma strict
var quality = QualityLevel.Fantastic;
function start()
{
QualitySettings.currentLevel = quality
}