The best way to implement singleton pattern in Unity.
The best way to implement singleton pattern in Unity.
| Getting Started | Features | License | Resources | Download |
|---|
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.
Learn More about Singleton pattern
This package can be added to your project via Git UPM. To add this package, copy:
https://github.com/UnityCommunity/UnitySingleton.gitand add it as a git package in the Unity Package Manager by clicking on the "+" icon on the top left of the Package Manager Window, and selecting "Install package from git URL".
Once you have the package installed, you may
Add using UnityCommunity.UnitySingleton; for using the classes.
Singleton for plain C# classes.MonoSingleton if you want a Scene-based singleton which is not persistent across scenes.PersistentMonoSingleton if you want a Global and persistent singleton across scenes.Please refer to CONTRIBUTING.md for more information on how to contribute to this project.
Run the following command in terminal or command prompt to clone the repository:
git clone https://github.com/UnityCommunity/UnitySingleton.gitOr Download the master branch as zip.
MIT @ Unity Community
Made with ❤️ by Unity Community
No open issues yet, or sync has not completed.