mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-18 22:20:07 +00:00
Update AssetSystem
This commit is contained in:
@@ -86,7 +86,7 @@ namespace YooAsset
|
||||
return asset as TObject;
|
||||
}
|
||||
|
||||
YooLogger.Warning($"Not found sub asset {assetName} in {_provider.AssetPath}");
|
||||
YooLogger.Warning($"Not found sub asset object : {assetName}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,12 +95,20 @@ namespace YooAsset
|
||||
// 4. 检测文件
|
||||
if (_steps == ESteps.CheckFile)
|
||||
{
|
||||
// 注意:本地已经存在的文件不保证完整性
|
||||
// 注意:如果原生文件已经存在,则验证其完整性
|
||||
if (File.Exists(_savePath))
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Succeed;
|
||||
return;
|
||||
bool result = DownloadSystem.CheckContentIntegrity(_savePath, _bundleInfo.SizeBytes, _bundleInfo.CRC);
|
||||
if (result)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Succeed;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Delete(_savePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (_bundleInfo.IsBuildinJarFile())
|
||||
@@ -166,7 +174,7 @@ namespace YooAsset
|
||||
return null;
|
||||
return File.ReadAllBytes(_savePath);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取原生文件的文本数据
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user