mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 03:28:47 +00:00
Update YooAssets.cs
检测原生文件加载方法,预防传入无效文件。
This commit is contained in:
@@ -536,6 +536,15 @@ namespace YooAsset
|
||||
}
|
||||
|
||||
BundleInfo bundleInfo = _bundleServices.GetBundleInfo(assetInfo);
|
||||
if (bundleInfo.IsRawFile == false)
|
||||
{
|
||||
string error = $"Cannot load asset bundle file using {nameof(GetRawFileAsync)} interfaces !";
|
||||
YooLogger.Warning(error);
|
||||
RawFileOperation operation = new CompletedRawFileOperation(error, copyPath);
|
||||
OperationSystem.StartOperaiton(operation);
|
||||
return operation;
|
||||
}
|
||||
|
||||
if (_playMode == EPlayMode.EditorSimulateMode)
|
||||
{
|
||||
RawFileOperation operation = new EditorPlayModeRawFileOperation(bundleInfo, copyPath);
|
||||
|
||||
Reference in New Issue
Block a user