Files
Gen_Hack-and-Slash-Roguelit…/Client/Assets/Scripts/Utils/Singleton.cs

8 lines
181 B
C#
Raw Normal View History

namespace Utils
{
public abstract class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance => _instance ??= new T();
}
}