void read_dict(Dictionary <string, object> dict) { _version = dict["version"] as string; try { _firstVersion = dict["firstVersion"] as string; } catch (Exception) { _firstVersion = _version; } _info.Clear(); Dictionary <string, object> infoDict = dict["info"] as Dictionary <string, object>; foreach (var info in infoDict) { Dictionary <string, object> asInfoDict = info.Value as Dictionary <string, object>; XBundleInfo assetInfo = new XBundleInfo(); assetInfo.read_dict(asInfoDict); _info[info.Key] = assetInfo; } callDependAllSize(); }
bool read_dict(Dictionary <string, object> dict) { oldver = readString(dict, "oldver"); if (oldver == "") { XDebug.LogError("配置文件oldver错误"); return(false); } newver = readString(dict, "newver"); if (newver == "") { XDebug.LogError("配置文件newver错误"); return(false); } alreadyDownloadDict.Clear(); Dictionary <string, object> infoDict = dict["downloadDict"] as Dictionary <string, object>; foreach (var info in infoDict) { Dictionary <string, object> asInfoDict = info.Value as Dictionary <string, object>; XBundleInfo assetInfo = new XBundleInfo(); assetInfo.read_dict(asInfoDict); alreadyDownloadDict[info.Key] = assetInfo; } return(true); }