示例#1
0
        /// <summary>
        /// 异步的
        /// </summary>
        public static void Get()
        {
            // 服务器里获取版本

            // 假装 WebPlayerTemplates 是服务器

            // 服务器的版本文件
            var remoteJsonPath = Application.dataPath + "/WebPlayerTemplates/HotfixServer/hotfix.json";

            Version = SerializeHelper.LoadJson <DLLVersion>(remoteJsonPath);

            Debug.Log("ServerJsonPath:" + Version.Version);
        }
示例#2
0
        public static void Load()
        {
            // 获取本地的版本

            // 从哪里获取 本地版本号
            // 2. persistentDataPath

            // 从来没更新过就从 stream 加载

            // 更新过 从 persistentDataPath

            // 怎么判断是否进行更新过

            // 1. streamingAssetsPath
            var versionJsonPath = Application.streamingAssetsPath + "/" + AssetBundleSettings.GetPlatformForAssetBundles(Application.platform) +
                                  "/hotfix/hotfix.json";

            var version = SerializeHelper.LoadJson <DLLVersion>(versionJsonPath);

            Version = version;
            Debug.Log("Local Version Loded:" + version.Version);
        }