When coding, there are times that you want to have a class instance available on demand. A tempting approach is to create a static field that will hold an instance; but this doesn't come without its pitfalls. We'll cover what the singleton pattern is, its pitfalls, and a Unity safe version that will give you the desired functionality.
Mobile and Web Developer for Lucity Inc, Trey Wheeler is positioning himself to start a Mobile and PC games studio by the name of Daemon Games. While game design could be considered his primary hobby, it's much more than that. Having created his first game in basic at the age of 6, to completing his BS in Software Engineering, with an emphasis in Game Programming, it's been a life long passion that he can't escape.