You can use singletons using Unity C#, Godot, Unreal C++, and other engines. Learn why game programmers "hate" them, and why they use them anyways.
We also look into static classes versus singletons, and some alternatives to the singleton pattern.
Intro: (0:00)
Game example for context: (2:01)
Common singleton response to game example: (5:58)
Main characteristics of a singleton: (8:40)
Explaining static classes: (9:23)
Advantages of singletons over static classes: (12:00)
Basic example structure of a singleton: (16:01)
Examples of singleton structure in Unity and Godot: (20:30)
Problems with the singleton pattern: (23:00)
Alternatives to using singletons: (29:11)
Conclusion: (34:29)
Silly drawing time: (36:09)
Ещё видео!