This is a custom Unity Package.
Currently we have a Singleton implementation that uses generic. It's amazingly easy to use and remove a lot of boilerplate.
- Open
Windows->Package Manager - Enable Preview Packages (Found in
Advanceddropdown) - Click on the
+icon at top-left corner ->Add package from git URL...
Add this entry to your Packages\Manifest.json
"dependencies": {
"com.daltonlima.core": "https://github.com/daltonbr/com.daltonlima.core.git",
..."com.unity.2d.sprite": "1.0.0",After importing the package, just inherit it like this
using DaltonLima.Core;
public class MySingletonClass : Singleton<MySingletonClass>
{
...
}