mirror of https://github.com/tuyoogame/YooAsset
update code summary
parent
5ca54b88fa
commit
8a2dc86cf7
|
@ -58,7 +58,7 @@ namespace YooAsset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IsRequestLocalFile(string url)
|
public static bool IsRequestLocalFile(string url)
|
||||||
{
|
{
|
||||||
//TODO : UNITY_STANDALONE_OSX平台目前无法确定
|
//TODO UNITY_STANDALONE_OSX平台目前无法确定
|
||||||
if (url.StartsWith("file:"))
|
if (url.StartsWith("file:"))
|
||||||
return true;
|
return true;
|
||||||
if (url.StartsWith("jar:file:"))
|
if (url.StartsWith("jar:file:"))
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace YooAsset
|
||||||
// 重新尝试下载
|
// 重新尝试下载
|
||||||
if (_steps == ESteps.TryAgain)
|
if (_steps == ESteps.TryAgain)
|
||||||
{
|
{
|
||||||
//TODO : 拷贝本地文件失败后不再尝试!
|
//TODO 拷贝本地文件失败后不再尝试!
|
||||||
if (_isReuqestLocalFile)
|
if (_isReuqestLocalFile)
|
||||||
{
|
{
|
||||||
Status = EOperationStatus.Failed;
|
Status = EOperationStatus.Failed;
|
||||||
|
@ -166,7 +166,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void InternalWaitForAsyncComplete()
|
internal override void InternalWaitForAsyncComplete()
|
||||||
{
|
{
|
||||||
//TODO : 防止下载器挂起陷入无限死循环!
|
//TODO 防止下载器挂起陷入无限死循环!
|
||||||
if (_steps == ESteps.None)
|
if (_steps == ESteps.None)
|
||||||
{
|
{
|
||||||
InternalOnStart();
|
InternalOnStart();
|
||||||
|
@ -174,7 +174,7 @@ namespace YooAsset
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
//TODO : 如果是导入或解压本地文件,执行等待完毕
|
//TODO 如果是导入或解压本地文件,执行等待完毕
|
||||||
if (_isReuqestLocalFile)
|
if (_isReuqestLocalFile)
|
||||||
{
|
{
|
||||||
InternalOnUpdate();
|
InternalOnUpdate();
|
||||||
|
|
|
@ -155,7 +155,7 @@ namespace YooAsset
|
||||||
// 重新尝试下载
|
// 重新尝试下载
|
||||||
if (_steps == ESteps.TryAgain)
|
if (_steps == ESteps.TryAgain)
|
||||||
{
|
{
|
||||||
//TODO : 拷贝本地文件失败后不再尝试!
|
//TODO 拷贝本地文件失败后不再尝试!
|
||||||
if (_isReuqestLocalFile)
|
if (_isReuqestLocalFile)
|
||||||
{
|
{
|
||||||
Status = EOperationStatus.Failed;
|
Status = EOperationStatus.Failed;
|
||||||
|
@ -188,7 +188,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void InternalWaitForAsyncComplete()
|
internal override void InternalWaitForAsyncComplete()
|
||||||
{
|
{
|
||||||
//TODO : 防止下载器挂起陷入无限死循环!
|
//TODO 防止下载器挂起陷入无限死循环!
|
||||||
if (_steps == ESteps.None)
|
if (_steps == ESteps.None)
|
||||||
{
|
{
|
||||||
InternalOnStart();
|
InternalOnStart();
|
||||||
|
@ -196,7 +196,7 @@ namespace YooAsset
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
//TODO : 如果是导入或解压本地文件,执行等待完毕
|
//TODO 如果是导入或解压本地文件,执行等待完毕
|
||||||
if (_isReuqestLocalFile)
|
if (_isReuqestLocalFile)
|
||||||
{
|
{
|
||||||
InternalOnUpdate();
|
InternalOnUpdate();
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
//TODO : 等待子线程验证文件完毕,该操作会挂起主线程
|
//TODO 等待子线程验证文件完毕,该操作会挂起主线程
|
||||||
InternalOnUpdate();
|
InternalOnUpdate();
|
||||||
if (IsDone)
|
if (IsDone)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_2023_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
//TODO : 官方BUG
|
//TODO 官方BUG
|
||||||
// BUG环境:Windows平台,Unity2022.3.41f1版本,编辑器模式。
|
// BUG环境:Windows平台,Unity2022.3.41f1版本,编辑器模式。
|
||||||
// BUG描述:异步实例化Prefab预制体,有概率丢失Mono脚本里序列化的数组里某个成员!
|
// BUG描述:异步实例化Prefab预制体,有概率丢失Mono脚本里序列化的数组里某个成员!
|
||||||
//_steps = ESteps.CloneAsync;
|
//_steps = ESteps.CloneAsync;
|
||||||
|
|
|
@ -209,7 +209,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 向网络端请求最新的资源版本
|
/// 请求最新的资源版本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="appendTimeTicks">在URL末尾添加时间戳</param>
|
/// <param name="appendTimeTicks">在URL末尾添加时间戳</param>
|
||||||
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
||||||
|
@ -220,9 +220,9 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 向网络端请求并更新清单
|
/// 加载指定版本的资源清单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="packageVersion">更新的包裹版本</param>
|
/// <param name="packageVersion">包裹版本</param>
|
||||||
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
||||||
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, int timeout = 60)
|
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, int timeout = 60)
|
||||||
{
|
{
|
||||||
|
@ -240,7 +240,7 @@ namespace YooAsset
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 预下载指定版本的包裹资源
|
/// 预下载指定版本的包裹资源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="packageVersion">下载的包裹版本</param>
|
/// <param name="packageVersion">包裹版本</param>
|
||||||
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
/// <param name="timeout">超时时间(默认值:60秒)</param>
|
||||||
public PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout = 60)
|
public PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout = 60)
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@ namespace YooAsset
|
||||||
|
|
||||||
#region 包裹信息
|
#region 包裹信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取当前激活包裹的版本信息
|
/// 获取当前加载包裹的版本信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetPackageVersion()
|
public string GetPackageVersion()
|
||||||
{
|
{
|
||||||
|
@ -281,7 +281,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取当前激活包裹的备注信息
|
/// 获取当前加载包裹的备注信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetPackageNote()
|
public string GetPackageNote()
|
||||||
{
|
{
|
||||||
|
@ -290,7 +290,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取当前激活包裹的详细信息
|
/// 获取当前加载包裹的详细信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PackageDetails GetPackageDetails()
|
public PackageDetails GetPackageDetails()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue