Making an RTS game #18: Preparing our game parameters (Unity/C#)

Today, let’s prepare a few things to make our game parameters ready for in-game display!

Mina Pêcheux
.Net Programming
Published in
14 min readJul 8, 2021

--

⬅️ Tutorial #17: Introducing a sound system 2/2| TOC | Tutorial #19: Displaying our in-game settings! ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

In the past tutorials, we’ve added a few game parameters in particular for our sound system. The issue is that, for now, those parameters are defined in Scriptable Objects — meaning in project assets that can only be modified by developers and game designers. Once the game has been compiled and shipped to the players, those settings aren’t accessible anymore! Wouldn’t it be sweet if the player could decide whether or not to have the background music? Or control the volume of ambient sounds? Or even toggle off the FOV for a “sandbox” game?

To do that, we’ll create an in-game settings panel that displays some of our parameters. But first, we’ll need to rewrite our GameParameters and GameSoundParameters classes a bit, and to create our own Unity inspector to make it easier to setup our parameters...

Refactoring the GameParameters with some…

--

--

Mina Pêcheux
.Net Programming

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)