Singleton, neat, cola back.
Certainly, patterns are one of the most important topics not only in game development but also in programming in general. It is unlikely that you will not be asked a question about patterns during an interview on a programmer position, and there is a strong feeling that Singleton mentioned first in 80% of them. =)
There are millions of articles about patterns, so if you feel a lack of theoretical knowledge about it, read this book or this concrete chapter about Singleton.
Singleton has almost the same count of implementations as articles about it, so that one more used here:
|
|
|
|
For Unity projects Singleton is one of the fundamental patterns (and not only for Unity). In our projects we will use classes named Managers. They will handle many different tasks, like scenes and transitions between them will be handled by SceneManager, or CameraManager will handle camera movement. So this is a small but fundamental post and it definitely will require to return to it. See you next time! =)