Files
gold_dolphin/unity/Assets/Script/Tools/Utils/Singleton.cs
2026-06-20 19:35:25 +08:00

18 lines
328 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Singleton<T> where T : new()
{
static T instance;
public static T Instance
{
get
{
if (instance == null)
return instance = new T();
return instance;
}
}
}