/// <summary> /// 解析客户端资源MD5配置; /// </summary> static public void ParseClientResourcesConfig(string outParentPath, string fileName) { if (!m_isDownLoadOpen) { return; } m_strClientJsonPath = outParentPath + fileName; KeyValuePairConfigHelper kvpHelper = new KeyValuePairConfigHelper(); kvpHelper.LoadConfigFromFile(m_strClientJsonPath); if (!m_dicLocalResVerReader.ContainsKey(fileName)) { m_dicLocalResVerReader.Add(fileName, kvpHelper); } else { Debug.LogError("WWWDownLoaderConfig ParseClientResourcesConfig, Same key : " + fileName); } }
/// <summary> /// 新下载文件完成,需要保存MD5配置; /// </summary> static public void SaveNewAssetMD5(string strName, string strMD5, string strBelongConfig) { KeyValuePairConfigHelper kvpHelper = null; if (m_dicLocalResVerReader.ContainsKey(strBelongConfig)) { kvpHelper = m_dicLocalResVerReader[strBelongConfig]; } else { kvpHelper = new KeyValuePairConfigHelper(); kvpHelper.LoadConfigFromFile(CommonValue.ClientVerDir + strBelongConfig); m_dicLocalResVerReader.Add(strBelongConfig, kvpHelper); } if (kvpHelper == null) { Debug.LogError("WWWDownLoaderConfig SaveNewAssetMD5,kvpHelper must be new first!"); return; } kvpHelper.SetNodeValue(strName, strMD5, null); }