diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs index ddd0751..585fff9 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryUpdate.cs @@ -34,6 +34,7 @@ namespace Cysharp.Threading.Tasks.Linq public _EveryUpdate(PlayerLoopTiming updateTiming, CancellationToken cancellationToken) { this.updateTiming = updateTiming; + this.cancellationToken = cancellationToken; TaskTracker.TrackActiveTask(this, 2); PlayerLoopHelper.AddAction(updateTiming, this); diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs index 35aaf91..a4869b2 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/Timer.cs @@ -104,6 +104,7 @@ namespace Cysharp.Threading.Tasks.Linq this.dueTimePhase = true; this.updateTiming = updateTiming; this.ignoreTimeScale = ignoreTimeScale; + this.cancellationToken = cancellationToken; TaskTracker.TrackActiveTask(this, 2); PlayerLoopHelper.AddAction(updateTiming, this); } @@ -223,6 +224,7 @@ namespace Cysharp.Threading.Tasks.Linq this.dueTimePhase = true; this.dueTimeFrameCount = dueTimeFrameCount; this.periodFrameCount = periodFrameCount; + this.cancellationToken = cancellationToken; TaskTracker.TrackActiveTask(this, 2); PlayerLoopHelper.AddAction(updateTiming, this);