Skip to content

Commit

Permalink
On complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillemsc committed Jun 12, 2022
1 parent 73a4a66 commit 91bdfee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Runtime/Loading/Services/LoadingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private void OnStartLoading()

IsLoading = true;

sequencer.OnComplete -= OnComplete;
sequencer.OnComplete += OnComplete;

foreach (Func<CancellationToken, Task> before in beforeLoad)
Expand All @@ -65,6 +64,8 @@ private void OnStartLoading()

private void OnComplete()
{
sequencer.OnComplete -= OnComplete;

foreach (Func<CancellationToken, Task> after in afterLoad)
{
sequencer.Play(after.Invoke);
Expand Down

0 comments on commit 91bdfee

Please sign in to comment.