public EPageNameConfig(EAssetBundleToolConfig _config)
        {
            Config = _config;
            VerticalLayout.Add(new EGUITitle("Module List Option"));
            EGUIHorizontalLayout hLayout = new EGUIHorizontalLayout();

            hLayout.Add(new EGUIButton("Save", OnClickSave));
            hLayout.Add(new EGUIButton("Refresh", OnClickRefresh));
            VerticalLayout.Add(hLayout);
            VerticalLayout.Add(new EGUITitle("Module List"));
            TreeRoot = new EGUIFolderTreeRoot(Config.ResourcePath);
            ReloadFolderData();
            VerticalLayout.Add(TreeRoot);
        }
Example #2
0
        protected virtual void OnEnable()
        {
            Configer = new EAssetBundleToolConfig();
            Configer.LoadConfig();

            Pages = new Dictionary <string, EGUI>();
            Pages.Add("AssetBundleNameConfig", new EPageNameConfig(Configer));
            Pages.Add("Main", new EPageMain(Configer, OnSetModuleName, OnClearModuleName, IsInvalidFile));

            ToolBar = new EGUIToolBar(new string[] {
                "Main",
                "AssetBundleNameConfig"
            }, 0,
                                      (choose) => {
                CurrentPage = Pages[choose];
            });
        }
Example #3
0
        public EPageMain(EAssetBundleToolConfig _config, Action <string, string> _eventSetModuleName, Action <string, string> _eventClearModuleName, Func <string, bool> _eventIsInvalidFile)
        {
            Config            = _config;
            OnSetModuleName   = _eventSetModuleName;
            OnClearModuleName = _eventClearModuleName;
            IsInvalidFile     = _eventIsInvalidFile;
            VerticalLayout.Add(new EGUITitle("Base Setting"));
            VerticalLayout.Add(new EGUIPathInput("ResourceRoot:", Config.ResourcePath, EventSaveResourceRoot));
            VerticalLayout.Add(new EGUITextInput("AssetBundleOutput:", Config.AssetBundleOutput, EventSaveAssetBundleRoot));
            VerticalLayout.Add(new EGUITextInput("AssetBundleExtension:", Config.AssetBundleExtension, EventAssetBundleExtension));
            VerticalLayout.Add(new EGUITextInput("NotAssetBundleFolderName:", Config.NotAssetBundleFolderName, EventNotAssetBundleFolderName));
            VerticalLayout.Add(new EGUIFilePathInput("VersionListTemplate:", Config.VersionListTemplateFile, EventVersionListTemplate));

            VerticalLayout.Add(new EGUITitle("Module List Options"));
            EGUIHorizontalLayout hLayout = new EGUIHorizontalLayout();

            hLayout.Add(new EGUIButton("Choose All", OnClickChooseAll));
            hLayout.Add(new EGUIButton("Cancel All", OnClickCancelAll));
            hLayout.Add(new EGUIButton("Refresh", OnClickRefresh));
            VerticalLayout.Add(hLayout);
            VerticalLayout.Add(new EGUITitle("Module List"));
            FolderList = new EGUIFolderList(_config.ResourcePath);
            VerticalLayout.Add(FolderList);

            VerticalLayout.Add(new EGUITitle("Build Options"));
            BuildTargetDropdown         = new EGUIEnumPopup(BuildTarget.Android);
            BuildTargetDropdown.Visible = false;
            VerticalLayout.Add(new EGUIToolBar(new string[] { TITLE_BUILD_TARGET_CURRENT, TITLE_BUILD_TARGET_SELECT }, 0, OnBuildTargetToolbarChanged));
            VerticalLayout.Add(BuildTargetDropdown);

            /*
             * 是否为模块创建依赖文件:
             * 无论你选择是还是否,在设置资源包名称的时候,都会主动为模块创建模块之间的以来关系文件
             *  如果选择是:
             *      在构建AB文件时,模块的依赖关系文件将会被构建为[ModuleName.bytes]的一个AB文件
             *  否则:
             *      在创建AB资源时,不会创建[ModuleName.bytes],同样该文件信息也不会写入版本文件中
             */
            VerticalLayout.Add(new EGUIToggle("Create Dependence For Module", Config.IsCreateDependence, v => Config.IsCreateDependence = v));

            /*
             * 是否创建版本文件
             * 允许导出的字段有:
             *     RelativePath(相对于Version.List的路径),文件名称(文件名称),MD5(唯一标识),Size(文件大小),Module(模块名称)
             * 如果选择是:
             *     构建AB完成后将会创建Version.list文件在导出目录的跟目录下
             * 否则:
             *     不会创建任何东西
             * 注:支持导出:csv,json,制表符,xml等格式的版本列表文件
             */
            VerticalLayout.Add(new EGUIToggle("Create Version List For Module", Config.IsCreateVersionList, v => Config.IsCreateVersionList = v));

            /*
             * 是否使用模块化的目录结构对于输出的AB文件
             * 如果选择是:
             *     在构建时会为模块创建单独的目录,目录的名称为模块名称
             * 否则:
             *     所有的导出文件全部在根目录
             */
            VerticalLayout.Add(new EGUIToggle("Use Module Structure For AssetBunle File", Config.IsModuleStructure, v => Config.IsModuleStructure = v));

            /*
             * 导出的Version.list文件是否使用模块化结构
             * 如果选择是:
             *     单独的模块生成单独的模块文件夹和单独的Version.list文件,Version.list中只记录当前模块占用的资源信息
             * 否则:
             *     只产生一个Version.List文件,记录所有模块资源的版本信息
             */
            VerticalLayout.Add(new EGUIToggle("Use Module Structure For VersionList File", Config.IsModuleStructureForVersion, v => Config.IsModuleStructureForVersion = v));

            hLayout = new EGUIHorizontalLayout();
            hLayout.Add(new EGUIButton("Clear AB Name", OnClearAssetBundleName));
            hLayout.Add(new EGUIButton("Set AB Name", OnSetAssetBundleName));
            hLayout.Add(new EGUIButton("Output AssetBundle", OnClickOutputAssetBundle));
            VerticalLayout.Add(hLayout);
        }