From 91bdfee41cfdbbf4d2695ebffed3bc80a39b4d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillem=20Sunyer=20Cald=C3=BA?= Date: Sun, 12 Jun 2022 23:30:57 +0200 Subject: [PATCH] On complete --- Runtime/Loading/Services/LoadingService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/Loading/Services/LoadingService.cs b/Runtime/Loading/Services/LoadingService.cs index a72e800..406fe88 100644 --- a/Runtime/Loading/Services/LoadingService.cs +++ b/Runtime/Loading/Services/LoadingService.cs @@ -54,7 +54,6 @@ private void OnStartLoading() IsLoading = true; - sequencer.OnComplete -= OnComplete; sequencer.OnComplete += OnComplete; foreach (Func before in beforeLoad) @@ -65,6 +64,8 @@ private void OnStartLoading() private void OnComplete() { + sequencer.OnComplete -= OnComplete; + foreach (Func after in afterLoad) { sequencer.Play(after.Invoke);