mirror of https://github.com/tuyoogame/YooAsset
fix #210
parent
2332765932
commit
82b2a5cc20
|
@ -88,7 +88,7 @@ namespace YooAsset
|
|||
internal abstract void InternalOnUpdate();
|
||||
internal virtual void InternalOnAbort() { }
|
||||
|
||||
internal void Init(string packageName)
|
||||
internal void SetPackageName(string packageName)
|
||||
{
|
||||
PackageName = packageName;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,16 @@ namespace YooAsset
|
|||
public static void StartOperation(string packageName, AsyncOperationBase operation)
|
||||
{
|
||||
_newList.Add(operation);
|
||||
operation.Init(packageName);
|
||||
operation.SetPackageName(packageName);
|
||||
operation.SetStart();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开始处理异步操作类
|
||||
/// </summary>
|
||||
public static void StartOperation(AsyncOperationBase operation)
|
||||
{
|
||||
_newList.Add(operation);
|
||||
operation.SetStart();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,9 @@ namespace YooAsset
|
|||
_failedTryAgain = failedTryAgain;
|
||||
_timeout = timeout;
|
||||
|
||||
// 设置包裹名称 (fix #210)
|
||||
SetPackageName(packageName);
|
||||
|
||||
// 统计下载信息
|
||||
CalculatDownloaderInfo();
|
||||
}
|
||||
|
@ -269,7 +272,7 @@ namespace YooAsset
|
|||
{
|
||||
if (_steps == ESteps.None)
|
||||
{
|
||||
OperationSystem.StartOperation(_packageName, this);
|
||||
OperationSystem.StartOperation(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue