private void AddAppModule() { if (AiukAppsSetting.IsExist(m_NewModuleName)) { EditorUtility.DisplayDialog("模块已存在", string.Format("所要添加的模块{0}已存在,添加模块失败!", m_NewModuleName), "知道了"); return; } if (string.IsNullOrEmpty(m_NewModuleName)) { EditorUtility.DisplayDialog("模块名为空", "不能添加名字为空的模块,添加模块失败!", "知道了"); return; } var newModule = new AiukAppModuleSetting(m_AppsSetting.CurrentApp, m_NewModuleName); m_AppsSetting.CurrentApp.AddModule(newModule); m_NewModuleName = null; AiukAppsSetting.Save(AiukAppsSetting.Instance); AssetDatabase.Refresh(); InitContext(); }
/// <summary> /// 创建一个新的应用集合设置文件。 /// </summary> /// <param name="organizationName">Organization name.</param> /// <param name="newAppName">New app name.</param> /// <param name="newModuleName">New module name.</param> public static void CreateAppsSetting ( string organizationName, string newAppName, string newModuleName, string rootDir ) { var appSetting = new AiukAppSetting(organizationName, newAppName, rootDir); var appModule = new AiukAppModuleSetting(appSetting, newModuleName); appSetting.AddModule(appModule); // 添加各应用模块共享的Share模块。 var shareModule = new AiukAppModuleSetting(appSetting, "Share"); appSetting.AddModule(shareModule); var appsSetting = new AiukAppsSetting(); }
public AiukAppModuleBuilder(AiukAppModuleSetting moduleSetting) { m_AppModule = moduleSetting; m_PahtHelper = new AiukAppModuleHelper(moduleSetting); }