コード例 #1
0
        public void OnBuildAssetBundlesComplete(Platform platform, string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, AssetBundleManifest assetBundleManifest)
        {
            string streamingAssetsPath = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));

            //删除StreamingAssets下的文件内容
            AssetBundleFileMove.DeleteDir(streamingAssetsPath);

            //删除开发环境下的 发布资源 同时保留 web.config
            AssetBundleFileMove.DeleteDir(Utility.Text.Format(ConfigPath.AssetBundleReleasePath, "IOS"));
        }
コード例 #2
0
        public void OnPostprocessPlatform(Platform platform, string workingPath, bool outputPackageSelected, string outputPackagePath, bool outputFullSelected, string outputFullPath, bool outputPackedSelected, string outputPackedPath, bool isSuccess, string augus, string applicationVersion)
        {
            if (isSuccess)
            {
                //生成version 信息

                string streamingAssetsPath = Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, "StreamingAssets"));

                //复制full文件到CDN发布目录
                AssetBundleFileMove.copyDir(
                    Utility.Text.Format(ConfigPath.AssetBundleABPath, "Full", applicationVersion, "IOS"),
                    ConfigPath.AssetBundleReleasePath
                    );

                //复制packed文件到StreamingAssets目录
                AssetBundleFileMove.copyFiles(
                    Utility.Text.Format(ConfigPath.AssetBundleABPath, "Packed", applicationVersion, "IOS"),
                    streamingAssetsPath
                    );

                Process.Start(Utility.Path.GetCombinePath(ConfigPath.VersionUpdatePath + ConfigPath.VersionUpdateExeName), augus);
            }
        }