private void DownloadLocalizedAssetAndDependencies(AssetList.Item node, AssetList assetList) { if (node == null) { return; } if (!node.Exist) { AssetDownloader.Add(node.IDStr); } for (int index = 0; index < node.Dependencies.Length; ++index) { if (!File.Exists(AssetDownloader.CachePath + node.Dependencies[index].IDStr)) { AssetDownloader.Add(node.Dependencies[index].IDStr); } } for (int index = 0; index < node.AdditionalDependencies.Length; ++index) { string path = AssetDownloader.CachePath + node.AdditionalDependencies[index].IDStr; string localizedObjectName = AssetManager.GetLocalizedObjectName(node.AdditionalDependencies[index].Path, false); AssetList.Item itemByPath = assetList.FindItemByPath(localizedObjectName); if (localizedObjectName == node.AdditionalDependencies[index].Path || itemByPath == null) { if (!File.Exists(path)) { AssetDownloader.Add(node.AdditionalDependencies[index].IDStr); } } else if (!File.Exists(AssetDownloader.CachePath + itemByPath.IDStr)) { AssetDownloader.Add(itemByPath.IDStr); } } for (int index = 0; index < node.AdditionalStreamingAssets.Length; ++index) { string path = AssetDownloader.CachePath + node.AdditionalStreamingAssets[index].IDStr; string localizedObjectName = AssetManager.GetLocalizedObjectName(node.AdditionalStreamingAssets[index].Path, false); AssetList.Item itemByPath = assetList.FindItemByPath(localizedObjectName); if (localizedObjectName == node.AdditionalStreamingAssets[index].Path || itemByPath == null) { if (!File.Exists(path)) { AssetDownloader.Add(node.AdditionalStreamingAssets[index].IDStr); } } else if (!File.Exists(AssetDownloader.CachePath + itemByPath.IDStr)) { DebugUtility.LogWarning("Downloading localized streaming dependency: " + localizedObjectName); AssetDownloader.Add(itemByPath.IDStr); } } }