update operation system

快速启动模式
pull/497/head
何冠峰 2025-02-19 18:36:33 +08:00
parent 576b842368
commit cc7290f10e
2 changed files with 19 additions and 0 deletions

View File

@ -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();
}
}
}
}

View File

@ -222,6 +222,15 @@ namespace YooAsset
}
OperationSystem.MaxTimeSlice = milliseconds;
}
/// <summary>
/// 设置异步系统参数,快速启动模式的开关
/// 注意:该模式默认开启
/// </summary>
public static void SetOperationSystemQuickStartMode(bool state)
{
OperationSystem.QuickStartMode = state;
}
#endregion
#region 调试信息