//遍历所有DLL
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
//遍历DLL下的所有类
foreach (var type in assembly.GetTypes())
{
if(type.FullName == "UnityEngine.UI.Text")
{
return type; //type是Type类型
}
}
}
扩展:
DLL可以单独加载
Assembly a = Assembly.LoadFile("UnityEngine.UI.dll");