unity Type.GetType() 返回null

加上你的命名空间试试

System.Type ty =  System.Type.GetType("myspace."+moduleName);

Type ty =  Type.GetType("myspace."+moduleName);

unity5  AddComponent 已经不能使用string ,

Type ty = Type.GetType("myspace."+moduleName);
module_GO.AddComponent(ty);

原文地址:https://www.cnblogs.com/sevenmoons/p/5614670.html