Пример #1
0
        protected override void ReadyClientValues()
        {
            SetValueItem(mIsBuildABKey, "true");            //是否生成资源包
            SetValueItem(mOverrideToStreamingKey, "false"); //是否将生成的资源包覆盖至Streaming目录
            SetValueItem(mABItemNameKey, string.Empty);
            SetValueItem(mDisplayResShowerKey, "true");     //是否显示带打包的资源列表
            SetValueItem(mIsBuildVersionsKey, "true");      //是否构建资源版本

            ResDataVersionEditorCreater.SetEditorValueItems(this);
        }
        public static void BuildVersions(ShipDockEditor editor, ref List <string> abNames)
        {
            string remoteGateway           = editor.GetValueItem(resVersionRootURLKey).Value;
            bool   isIgnoreRemote          = editor.GetValueItem("is_ignore_remote").Bool;
            bool   isSyncClientVersions    = editor.GetValueItem("is_sync_client_versions").Bool;
            bool   isUpdateAdditionVersion = editor.GetValueItem(updateAdditionVersionKey).Bool;
            bool   isUpdateResVersion      = editor.GetValueItem(updateTotalVersionKey).Bool;
            bool   isSyncAppVersion        = editor.GetValueItem("sync_app_version").Bool;
            string clientVersionsFileName  = editor.GetValueItem(versionFileNameKey).Value;

            ResDataVersionEditorCreater creater = new ResDataVersionEditorCreater()
            {
                ABNamesWillBuild      = abNames,
                resRemoteGateWay      = remoteGateway,
                isSyncClientVersions  = isSyncClientVersions,
                isUpdateVersion       = isUpdateAdditionVersion,
                isUpdateResVersion    = isUpdateResVersion,
                isSyncAppVersion      = isSyncAppVersion,
                ClientVersionFileName = clientVersionsFileName,
            };

            creater.CreateResDataVersion(isIgnoreRemote);
        }
Пример #3
0
        /// <summary>
        /// 更新编辑器的 GUI 界面
        /// </summary>
        protected override void CheckGUI()
        {
            base.CheckGUI();

            EditorGUILayout.Space();
            EditorGUILayout.BeginVertical();
            bool isIgnoreRemote = false;
            bool isBuildAB      = ValueItemTriggle(mIsBuildABKey, "创建资源包");

            if (isBuildAB)
            {
                ValueItemTriggle(mOverrideToStreamingKey, "    资源打包完成后复制到 SteamingAssets");
            }
            else
            {
            }

            bool isBuildVersions = ValueItemTriggle("is_build_versions", "生成资源版本");

            if (isBuildVersions)
            {
                if (isBuildAB)
                {
                    ResDataVersionEditorCreater.CheckEditorGUI(this);
                }
                else
                {
                    ValueItemTriggle("sync_app_version", "    更新版本配置的App版本号");
                    ValueItemTriggle("is_sync_client_versions", "    作为最新版客户端的资源配置模板");
                }

                ResDataVersionEditorCreater.CheckGatewayEditorGUI(this, out isIgnoreRemote);

                string versionFileNameKey = ResDataVersionEditorCreater.ApplyReleaseGateway ?
                                            ResDataVersionEditorCreater.versionFileNameReleaseKey : ResDataVersionEditorCreater.versionFileNameKey;

                ValueItemTextAreaField(versionFileNameKey, true, "    客户端配置资源文件名");
            }
            else
            {
            }

            if (isBuildAB)
            {
                ResList = ShipDockEditorData.Instance.selections;

                ShowABWillBuildResult();

                if (GUILayout.Button("Build Assets"))
                {
                    AssetBuilding();
                }
                else
                {
                }
            }
            else if (isBuildVersions)
            {
                if (isIgnoreRemote)
                {
                    if (GUILayout.Button("Build Versions Only"))
                    {
                        BuildVersions(default);