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