mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-18 22:20:07 +00:00
update operation system
快速启动模式
This commit is contained in:
@@ -13,6 +13,11 @@ namespace YooAsset
|
||||
private static Stopwatch _watch;
|
||||
private static long _frameTime;
|
||||
|
||||
/// <summary>
|
||||
/// 快速启动模式
|
||||
/// </summary>
|
||||
public static bool QuickStartMode = false;
|
||||
|
||||
/// <summary>
|
||||
/// 异步操作的最小时间片段
|
||||
/// </summary>
|
||||
@@ -136,6 +141,11 @@ namespace YooAsset
|
||||
_newList.Add(operation);
|
||||
operation.SetPackageName(packageName);
|
||||
operation.SetStart();
|
||||
|
||||
if (QuickStartMode)
|
||||
{
|
||||
operation.InternalOnUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,6 +222,15 @@ namespace YooAsset
|
||||
}
|
||||
OperationSystem.MaxTimeSlice = milliseconds;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置异步系统参数,快速启动模式的开关
|
||||
/// 注意:该模式默认开启
|
||||
/// </summary>
|
||||
public static void SetOperationSystemQuickStartMode(bool state)
|
||||
{
|
||||
OperationSystem.QuickStartMode = state;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 调试信息
|
||||
|
||||
Reference in New Issue
Block a user