mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-07-04 05:03:43 +00:00
update yooasset2.0
This commit is contained in:
@@ -267,7 +267,6 @@ namespace YooAsset
|
||||
return operation;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ResourceUnpackerOperation : DownloaderOperation
|
||||
{
|
||||
internal ResourceUnpackerOperation(string packageName, List<BundleInfo> downloadList, int downloadingMaxNumber, int failedTryAgain, int timeout)
|
||||
@@ -285,4 +284,21 @@ namespace YooAsset
|
||||
return operation;
|
||||
}
|
||||
}
|
||||
public sealed class ResourceImporterOperation : DownloaderOperation
|
||||
{
|
||||
internal ResourceImporterOperation(string packageName, List<BundleInfo> downloadList, int downloadingMaxNumber, int failedTryAgain, int timeout)
|
||||
: base(packageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建空的导入器
|
||||
/// </summary>
|
||||
internal static ResourceImporterOperation CreateEmptyImporter(string packageName, int upackingMaxNumber, int failedTryAgain, int timeout)
|
||||
{
|
||||
List<BundleInfo> downloadList = new List<BundleInfo>();
|
||||
var operation = new ResourceImporterOperation(packageName, downloadList, upackingMaxNumber, failedTryAgain, int.MaxValue);
|
||||
return operation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,8 @@ namespace YooAsset
|
||||
{
|
||||
_packageBundleCount = _buffer.ReadInt32();
|
||||
Manifest.BundleList = new List<PackageBundle>(_packageBundleCount);
|
||||
Manifest.BundleDic = new Dictionary<string, PackageBundle>(_packageBundleCount);
|
||||
Manifest.BundleDic1 = new Dictionary<string, PackageBundle>(_packageBundleCount);
|
||||
Manifest.BundleDic2 = new Dictionary<string, PackageBundle>(_packageBundleCount);
|
||||
_progressTotalValue = _packageBundleCount;
|
||||
_steps = ESteps.DeserializeBundleList;
|
||||
}
|
||||
@@ -203,8 +204,9 @@ namespace YooAsset
|
||||
packageBundle.Tags = _buffer.ReadUTF8Array();
|
||||
packageBundle.DependIDs = _buffer.ReadInt32Array();
|
||||
packageBundle.ParseBundle(Manifest);
|
||||
Manifest.BundleList.Add(packageBundle);
|
||||
Manifest.BundleDic.Add(packageBundle.BundleName, packageBundle);
|
||||
Manifest.BundleList.Add(packageBundle);
|
||||
Manifest.BundleDic1.Add(packageBundle.BundleName, packageBundle);
|
||||
Manifest.BundleDic2.Add(packageBundle.FileName, packageBundle);
|
||||
|
||||
// 注意:原始文件可能存在相同的CacheGUID
|
||||
if (Manifest.CacheGUIDs.Contains(packageBundle.CacheGUID) == false)
|
||||
|
||||
Reference in New Issue
Block a user