Singleton Design Pattern

The singleton design pattern is used to allow any class to access the singleton script without having to reference it. Singletons should only be used for scripts that will only have one instance of itself like manager classes. This works by creating a static reference to the script in memory. You will also check to determine if there is an instance of the singleton to use and if there is not you will give an error.

When it is set up you will be able to create a method in the singleton script.

And then use it in any script without having to create a reference or null check.