private void OnEnable() { List <object> classList = new List <object>(); AttributeUtil.GetAllInstanceClass <ActModuleAttribute>(classList, typeof(AttributeUtil)); AttributeUtil.GetAllInstanceClass <ActModuleAttribute>(classList, typeof(InjectDataAttribute)); foreach (object obj in classList) { Type type = obj.GetType(); object[] modea = type.GetCustomAttributes(typeof(ActModuleAttribute), false); ActModuleAttribute modeAttribute = modea[0] as ActModuleAttribute; moduleMap[modeAttribute.ModuleEnum] = type; } //加载左边的角色列表 leftRoleTreeMgr = new ActRoleTree(this); rightActSkills = new EditorScrollWidgetState <object>(); }