generated from pancake-llc/package
-
Notifications
You must be signed in to change notification settings - Fork 16
Anti Singleton
yenmoc edited this page Jan 15, 2024
·
2 revisions
/// <summary>
/// I don't want to use singleton as a pattern outside internal
/// so no base class singleton was created
/// </summary>
/// <summary>
/// Singleton is programming pattern uses a single globally-accessible
/// instance of a class, available at all time.
///
/// This is useful to make global manager that hold variables
/// and functions that are globally accessible
///
/// achieve a persistent state across multiple scenes and are fast to implement
/// with a smaller project, this approach can be useful
///
/// When we're referencing the instance of a singleton class from another script
/// we're creating a dependency between these two classes
/// </summary>