Example #1
0
        /// <summary>
        /// 获取母包资源构建信息
        /// </summary>
        /// <returns></returns>
        static public BasePackageAssetsBuildInfo GetPacakgeBuildInfo(string ouptputPath, RuntimePlatform platform)
        {
            var path      = IPath.Combine(ouptputPath, BApplication.GetPlatformPath(platform), BResources.PACKAGE_BUILD_INFO_PATH);
            var buildinfo = new BasePackageAssetsBuildInfo();

            if (File.Exists(path))
            {
                var text = File.ReadAllText(path);
                buildinfo = JsonMapper.ToObject <BasePackageAssetsBuildInfo>(text);
            }
            return(buildinfo);
        }
Example #2
0
        /// <summary>
        /// 保存母包资源info
        /// </summary>
        /// <param name="ouptputPath"></param>
        /// <param name="platform"></param>
        /// <param name="info"></param>
        static public void SaveBasePackageBuildInfo(string ouptputPath, RuntimePlatform platform, BasePackageAssetsBuildInfo info)
        {
            //转json
            var content = JsonMapper.ToJson(info);
            //写入本地
            var path = IPath.Combine(ouptputPath, BApplication.GetPlatformPath(platform), BResources.PACKAGE_BUILD_INFO_PATH);

            FileHelper.WriteAllText(path, content);
        }