Пример #1
0
        /// <summary>
        /// 更新&生成上传列表信息.
        /// </summary>
        /// <param name="iBundleType">Bundle Type.</param>
        /// <param name="iHashCodes">HashCode列表(Unity3d打包生成).</param>
        public void UpdateUploadList(TBundleType iBundleType, Dictionary <string, string> iHashCodes = null)
        {
            UploadList list = UploadList.GetInstance();

            if (list == null)
            {
                return;
            }

            list.AppVersion    = BuildInfo.GetInstance().BuildVersion;
            list.CenterVersion = BuildInfo.GetInstance().CenterVersion;

            // MainManifest
            if (TBundleType.Normal == iBundleType)
            {
                list.AddMainManifestAssetsTarget();
            }

            // 遍历Bundles
            foreach (BundleMap loop in this.Maps)
            {
                if (loop.Type != iBundleType)
                {
                    continue;
                }

                string hashCode = null;
                if (iHashCodes != null)
                {
                    hashCode = this.GetHashCodeOfBundle(iHashCodes, loop.ID);
                }

                // Bundle
                list.AddTarget(loop, TUploadFileType.Bundle, hashCode);
                if ((true == list.ManifestUpload) && (TBundleType.Scene != loop.Type))
                {
                    // Manifest(Normal)
                    list.AddTarget(loop, TUploadFileType.NormalManifest);
                }
            }
        }