The best way to implement singleton pattern in Unity.
MIT License
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
Add using UnityCommunity.UnitySingleton;
for using the classes.
Singleton<T>
for plain C# classes.MonoSingleton<T>
if you want a Scene-based singleton which is not persistent across scenes.PersistentMonoSingleton<T>
if you want a Global and persistent singleton across scenes.Run the following command in terminal or command prompt to clone the repository:
git clone https://github.com/UnityCommunity/UnitySingleton.git
Or π₯ Download the master branch as zip.
MIT @ Unity Community
Made with β€οΈ by Unity Community