mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Fix CoLoopWithBudget default budget being zero
This commit is contained in:
1 parent
d827e5d1f9
commit
9e5b470ae6
1 file changed
+1
-1
@@ -242,7 +242,7 @@ public static class Extensions
|
||||
public static IEnumerator CoLoopWithBudget<T>(this IEnumerable<T> collection, Action<T> action)
|
||||
{
|
||||
var fps = Application.targetFrameRate > 0 ? Application.targetFrameRate : 60;
|
||||
long budget = 1 / (fps * 2); // default is half of current frame time.
|
||||
var budget = 1000L / (fps * 2); // default is half of current frame time.
|
||||
yield return collection.CoLoopWithBudget(budget, action);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user