/// <summary>
        /// 生成资源配置信息: 资源包信息, 资源与包的关系信息
        /// </summary>
        static void CreatAssetversionInfo(string game)
        {
            Dictionary <string, Hash128> abDic = new Dictionary <string, Hash128>();
            string manifestFolder = game + "_ab";
            string mainFolder     = game + "_Res";

            mainFolder = mainFolder.ToLower();
            GetABInfo(game, pathRes_Editor + "/" + manifestFolder + "/" + mainFolder, ref abDic);
            AssetVersion rinfo = new AssetVersion();

            rinfo.manifestName = mainFolder + "/" + manifestFolder; //  将manifest文件放入对应游戏资源子目录下
            foreach (KeyValuePair <string, Hash128> kp in abDic)
            {
                rinfo.bundlesInfo.Add(kp.Key, kp.Value);
            }
            string path = pathConfig_Editor + "/" + game + "/assetVersion.config";

            FileUtil.SaveFile(path, rinfo.ToStr());
            CopyToStreamingAssets(game, path);
        }
Exemple #2
0
    void initAppConfig()
    {
        string[]   gs  = System.Enum.GetNames(typeof(GameEnum));
        APPVersion app = new APPVersion();

        //AssetConfig
        for (int i = 0; i < gs.Length; i++)
        {
            GameVersion ver = new GameVersion(gs[i], "name:" + gs[i]);
            app.Add(ver);
            AssetVersion aver = new AssetVersion();
            aver.assetVersion = 0;
            AssetbundleConfig abcon = new AssetbundleConfig();
            abcon.AddAssetBundle("test", "has001");
            PreloadConfig pre = new PreloadConfig();

            FileUtil.SaveFile(path + "/" + gs[i] + "/assetVersion.config", aver.ToStr());
            FileUtil.SaveFile(path + "/" + gs[i] + "/abConfig.config", abcon.ToString());
            FileUtil.SaveFile(path + "/" + gs[i] + "/preloadConfig.config", pre.ToString());
        }
        FileUtil.SaveFile(path + "/appVersion.config", app.ToString());                   //appversion
    }