public static type GetClassType(string ClassName,string dllname) { Type ClassType =null; foreach(Assembly am in AppDomain.CurrentDomain.GetAssemblies()) { if (am.FullName.Contains(dllname)) { ClassType=am.GetType(ClassName); if (ClassType !=null) bre…
using System.Reflection; 1.载入Dll Assembly asm=Assembly.LoadFile(FullPath);//FullPath 为Dll所在位置的全路径. 2.取得所需要的类的类型 Type t = asm.GetType("namespaceName.className");//命名空间名.类名 3.建立此类型的对象(相当于 new) object o = Activator.CreateInstance(t); //创建Type t类型的对…
1.32位的 .dll 无法在64位的unity编辑器下运行. System.DllNotFoundException: xxx , 64位的程序运行32位的dll是会报这种错 2.Failed to load 'Assets/Plugins/xxx.dll', expected x64 architecture, but was x86 architecture. You must recompile your plugin for x64 architecture. 将CPU选择.dll对…