Files
Gen_Hack-and-Slash-Roguelit…/Client/Assets/Scripts/Utils/Singleton.cs
2025-07-09 16:45:29 +08:00

8 lines
172 B
C#

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