Creating a Settings Menu in 10 minutes in Unity

Josh Watts
2 min readOct 24, 2022

Here we want to create a menu that can change the volume and brightness of our game. This menu will only be accessible if we hit the escape key and will pause the game. In order to tell if our game is actually paused we need some basic movement, in this case some spheres will be falling. To do that we need a script called pause menu.

Here in update we check if hit the escape key and if we did we pause the game by taking the time scale to zero and activating the game object that holds our pause menu. To create the spheres falling we need a coroutine that we can call in start.

Next we want to adjust the volume on our slider. We do not need to need to create a public method as we can call it from our empty game object that holds our audio source. On our slider we can just grab the volume on the audio source and change it.

For the brightness we need to create an image, set its color to black and turn off raycast target so it does not interfere with us clicking on our sliders.

Than we need to create a public method that we can call from our brightness slider. This will allow us to control the alpha of our image. The higher the alpha the darker it gets.

Here is the final result.

--

--

Josh Watts

Hello I am an aspiring game developer learning to develop great games. Right now I am going through a program with GameDevHQ. My favorite game is Half-Life.