加上你的命名空间试试

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);

相关文章: