| Getting Started | Features | License | Resources | Download |
|---|
Unity Singleton
The best way to implement singleton pattern in Unity. By using this pattern you will be able to define Global variables and classes and use their methods and properties in Global. This pattern is a must have for most of the games that made using Unity engine.
Features
- Works in both Development and Production
- Instantiates Singleton objects if they aren't available by Lazy Load
- You can configure fields in the inspector for singleton objects in the preload scene
Getting Started
- Download the Project.
- Open the Project in Unity.
- Create your own Singleton classes by extending the Generic
✨ Singleton✨ class.🚀 Check out the example GameManager - Attach your singleton classes to the GameManager game object in the _Preload scene.
- Edit the variables inside the inspector
- Run the game and enjoy!
Download
Run the following command in terminal or command prompt to clone the repository:
git clone https://github.com/UnityCommunity/UnitySingleton.gitOr
Resources
📖 UnityGeek Singleton Article📖 Stackoverflow Answer📖 Unity Offical Wiki Singleton📖 Singleton.cs Gist📖 Wikipedia
License
MIT @ Unity Community
Made with

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
