Skip to content
This repository was archived by the owner on Dec 21, 2019. It is now read-only.

Commit a41b898

Browse files
authored
Fix sync period
1 parent 3de4a99 commit a41b898

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Rocket.UnityEngine/Scheduling/UnityTaskScheduler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ public virtual void Update()
125125
var cpy = Tasks.ToList(); // we need a copy because the task list may be modified at runtime
126126
foreach (ITask task in cpy.Where(c => !c.IsFinished && !c.IsCancelled))
127127
{
128-
if (task.ExecutionTarget != ExecutionTargetContext.EveryFrame
129-
&& task.ExecutionTarget != ExecutionTargetContext.NextFrame)
130-
continue;
128+
if(task.Period == null && task.ExecutionTarget != ExecutionTargetContext.Sync)
129+
if (task.ExecutionTarget != ExecutionTargetContext.EveryFrame
130+
&& task.ExecutionTarget != ExecutionTargetContext.NextFrame)
131+
continue;
131132

132133
RunTask(task);
133134
}

0 commit comments

Comments
 (0)