using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class Singleton<T>: IDisposable where T : new()
{
private static T instance;
public static T Instance
{
get
{
if (instance == null)
{
instance = new T();
}
return instance;
}
}
//脚本销毁调用
public virtual void Dispose()
{
}
}