@@ -75,6 +75,11 @@ namespace YooAsset
|
||||
/// </summary>
|
||||
public bool AppendFileExtension { private set; get; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义参数:禁用边玩边下机制
|
||||
/// </summary>
|
||||
public bool DisableOnDemandDownload { private set; get; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义参数:最大并发连接数
|
||||
/// </summary>
|
||||
@@ -222,6 +227,10 @@ namespace YooAsset
|
||||
{
|
||||
AppendFileExtension = Convert.ToBoolean(value);
|
||||
}
|
||||
else if (name == FileSystemParametersDefine.DISABLE_ONDEMAND_DOWNLOAD)
|
||||
{
|
||||
DisableOnDemandDownload = Convert.ToBoolean(value);
|
||||
}
|
||||
else if (name == FileSystemParametersDefine.DOWNLOAD_MAX_CONCURRENCY)
|
||||
{
|
||||
DownloadMaxConcurrency = Convert.ToInt32(value);
|
||||
|
||||
+11
-1
@@ -49,7 +49,17 @@ namespace YooAsset
|
||||
}
|
||||
else
|
||||
{
|
||||
_steps = ESteps.DownloadFile;
|
||||
if (_fileSystem.DisableOnDemandDownload)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = $"The bundle not cached : {_bundle.BundleName}";
|
||||
YooLogger.Warning(Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
_steps = ESteps.DownloadFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user