Options menu and the troubles following it.
|
In my last blogpost I talked, briefly, about how i was making the main menu. Since then i’ve put my focus on doing an options menu with proper settings like, resolutions and volume control. I started in a simple manner with implementing the fullscreen wich was suprisingly simple. Literally three lines of code was all that was needed for it to be functioning (I’ll never get over how simple everything seems to be in unity). What I thought would be the hardest thing to implement was resolutions since different computers have different settings for their resolutions based on their graphics card (I think it’s the only thing resolutions are based on but i can be very wrong). The reolusitons itself was simple to implement, I just made the computer check what resolutions it had available and stored them in an array. The volume controls showed itself to be a problem. The volume control itself was simple, just tying the value of the volume of the audio source to a slider was simple, but to make it work over the entire game eluded me. Now it only works on the main menu. I’m thinking that putting all the music and sound effects into prefabs will remove the problem, but i’ve yet to try it. I also worked on a proper pause menu for the game but it’s just all the scripts and buttons from the main menu put in the scenes. The only thing i added to the pause menu that isn’t in the main menu is a pause script to keep the game from running while you play and avoid unnessecary frustrations. |
