Creating a Manager Classes in Unity

How to control the flow of your game

Rusben Guzman
2 min readDec 28, 2021

In game development in most cases we will need a piece of code in charge of managing general things separated from the mechanics or the main gameplay functionalities, things like UI management, Audio management, state of the game and more.

Photo by Pankaj Patel on Unsplash

There are a lot of ways to solve this but the most common is to create a script called GameManager and start defining different functions and properties to control every general aspect of the game. Also you can have different scripts, one for UI, one for Audio, etc…

Photo by Sigmund on Unsplash

Also there are some predefined solutions for specific cases called Game Programming Patterns. In easy words the Game Programming Patterns are ways to write a code to make it cleaner, easier to understand, faster and designed to solve common problems about game development. If you want to know more about this, here I leave you a link to a book with more information:

https://gameprogrammingpatterns.com/

--

--

Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.