Skip to content

Commit

Permalink
Fix bug in CoroutineManager
Browse files Browse the repository at this point in the history
Solve issue that multiple Pause() / Resume() calls per Update() were not being handled correctly
  • Loading branch information
Inspiaaa committed Aug 30, 2023
1 parent d0bdb42 commit 64b8be9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CoroutineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void ActivateCoroutine(CoroutineBase coroutine)
if (isIteratingActiveCoroutines)
{
coroutinesToActivate.Add(coroutine);
coroutinesToDeactivate.Remove(coroutine);
}
else
{
Expand All @@ -37,6 +38,7 @@ public void DeactivateCoroutine(CoroutineBase coroutine)
if (isIteratingActiveCoroutines)
{
coroutinesToDeactivate.Add(coroutine);
coroutinesToActivate.Remove(coroutine);
}
else
{
Expand Down

0 comments on commit 64b8be9

Please sign in to comment.