mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 11:38:47 +00:00
@@ -75,6 +75,11 @@ namespace YooAsset
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AppendFileExtension { private set; get; } = false;
|
public bool AppendFileExtension { private set; get; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义参数:禁用边玩边下机制
|
||||||
|
/// </summary>
|
||||||
|
public bool DisableOnDemandDownload { private set; get; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义参数:最大并发连接数
|
/// 自定义参数:最大并发连接数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -222,6 +227,10 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
AppendFileExtension = Convert.ToBoolean(value);
|
AppendFileExtension = Convert.ToBoolean(value);
|
||||||
}
|
}
|
||||||
|
else if (name == FileSystemParametersDefine.DISABLE_ONDEMAND_DOWNLOAD)
|
||||||
|
{
|
||||||
|
DisableOnDemandDownload = Convert.ToBoolean(value);
|
||||||
|
}
|
||||||
else if (name == FileSystemParametersDefine.DOWNLOAD_MAX_CONCURRENCY)
|
else if (name == FileSystemParametersDefine.DOWNLOAD_MAX_CONCURRENCY)
|
||||||
{
|
{
|
||||||
DownloadMaxConcurrency = Convert.ToInt32(value);
|
DownloadMaxConcurrency = Convert.ToInt32(value);
|
||||||
|
|||||||
@@ -49,7 +49,17 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
else
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace YooAsset
|
|||||||
public const string APPEND_FILE_EXTENSION = "APPEND_FILE_EXTENSION";
|
public const string APPEND_FILE_EXTENSION = "APPEND_FILE_EXTENSION";
|
||||||
public const string DISABLE_CATALOG_FILE = "DISABLE_CATALOG_FILE";
|
public const string DISABLE_CATALOG_FILE = "DISABLE_CATALOG_FILE";
|
||||||
public const string DISABLE_UNITY_WEB_CACHE = "DISABLE_UNITY_WEB_CACHE";
|
public const string DISABLE_UNITY_WEB_CACHE = "DISABLE_UNITY_WEB_CACHE";
|
||||||
|
public const string DISABLE_ONDEMAND_DOWNLOAD = "DISABLE_ONDEMAND_DOWNLOAD ";
|
||||||
public const string DOWNLOAD_MAX_CONCURRENCY = "DOWNLOAD_MAX_CONCURRENCY";
|
public const string DOWNLOAD_MAX_CONCURRENCY = "DOWNLOAD_MAX_CONCURRENCY";
|
||||||
public const string DOWNLOAD_MAX_REQUEST_PER_FRAME = "DOWNLOAD_MAX_REQUEST_PER_FRAME";
|
public const string DOWNLOAD_MAX_REQUEST_PER_FRAME = "DOWNLOAD_MAX_REQUEST_PER_FRAME";
|
||||||
public const string RESUME_DOWNLOAD_MINMUM_SIZE = "RESUME_DOWNLOAD_MINMUM_SIZE";
|
public const string RESUME_DOWNLOAD_MINMUM_SIZE = "RESUME_DOWNLOAD_MINMUM_SIZE";
|
||||||
|
|||||||
Reference in New Issue
Block a user