Daily Progression: UI Manager Setup!

addam davis
2 min readFeb 17, 2022

Objective: Create the UI Manager!

We have discussed UI Managers before so this tutorial will be more of a refresher. We are going to begin by creating a new script “UI Manager”

The coding pattern used to create the UI Manager is Singleton. To create a singleton pattern, you start with a private static UI Manager instance.

You then need a public UI Manager instance with the get property, that if not null, will return the private instance.

To finish it off, we need an awake method that when called it sets the instance to this object.

From here if we wanted, we could create a case.

If you followed the previous tutorial, where I discussed creating cases, then you can now go into the Unity editor and on the canvas, you will see the active case and inside that you will see all the properties of a case.

We could also easily convert the case to an array of cases.

Now the UI Manager is set up and ready to use and you now have a visual understanding of what makes up a case, and a method to hard code several cases!