- Home /
Game inherits main menu settings
Hey!
I have one question. I have 2 different scenes. One is for main menu and another is for game. In main menu i have settings for audio volume and game quality. In the main menu there is also a song playing and the volume level settings works great. My question is how can this settings be inherited into the game.
Example:
If i set volume at half of the max. volume, the music in game should play at half of the max volume.
If i set qualitiy settings to Fantastic in menu, the game runs in Fantastic quality.
Ty for answers!
Answer by MarkFinn · Jan 07, 2013 at 07:08 AM
You can store the numerical values for the quality and audio levels, and apply them to the camera and audio-listener as you load each scene,
Or
You can set your camera and audio-listener (or whatever it is attached to) to not destroy on scene load and reuse them from scene to scene.
We went with option 1. It was far more flexible.
Answer by djur0 · Jan 07, 2013 at 10:32 AM
For quality settings i used Qualitysettings.currentlevel = qualitylevel.fantastic. How can i store the value from here and then apply it in another scene? Can you give me some example code please