mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
* [fix] installed as a package ,class not found issue
This commit is contained in:
@@ -69,7 +69,23 @@ public static class EventInterfaceGenerate
|
|||||||
EventInterfaceGenerateTag.HadGenerate = true;
|
EventInterfaceGenerateTag.HadGenerate = true;
|
||||||
|
|
||||||
// 加载程序集
|
// 加载程序集
|
||||||
Assembly assembly = typeof(GameApp).Assembly;
|
Assembly assembly = null;
|
||||||
|
foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
|
||||||
|
{
|
||||||
|
foreach(var type in asm.GetTypes())
|
||||||
|
{
|
||||||
|
if (type.Name == "GameApp")
|
||||||
|
{
|
||||||
|
assembly = asm;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(assembly == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("Game App Class Not Found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 获取程序集中的所有类型
|
// 获取程序集中的所有类型
|
||||||
Type[] types = assembly.GetTypes();
|
Type[] types = assembly.GetTypes();
|
||||||
|
Reference in New Issue
Block a user