把代码核心逻辑移入热更工程,热更工程生成编译后可以直接Copy dll 和 mdb文件到UnityAsset目录下

把代码核心逻辑移入热更工程,热更工程生成编译后可以直接Copy dll 和 mdb文件到UnityAsset目录下
This commit is contained in:
ALEXTANG
2022-05-23 13:49:07 +08:00
parent 2e7263101a
commit 572b768ce2
82 changed files with 13764 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
namespace TEngineCore
{
/// <summary>
/// 通用单例,无需释放和销毁
/// </summary>
/// <typeparam name="T"></typeparam>
public class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null)
{
_instance = new T();
}
return _instance;
}
}
public static T Active()
{
return Instance;
}
}
}