Update PatchSystem
增加清理缓存资源的异步操作类
This commit is contained in:
@@ -13,6 +13,17 @@ namespace YooAsset
|
||||
private static long _maxTimeSlice;
|
||||
private static long _frameTime;
|
||||
|
||||
/// <summary>
|
||||
/// 处理器是否繁忙
|
||||
/// </summary>
|
||||
public static bool IsBusy
|
||||
{
|
||||
get
|
||||
{
|
||||
return _watch.ElapsedMilliseconds - _frameTime >= _maxTimeSlice;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化异步操作系统
|
||||
@@ -32,7 +43,7 @@ namespace YooAsset
|
||||
|
||||
for (int i = _operations.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (_watch.ElapsedMilliseconds - _frameTime >= _maxTimeSlice)
|
||||
if (IsBusy)
|
||||
return;
|
||||
|
||||
var operation = _operations[i];
|
||||
|
||||
Reference in New Issue
Block a user