From 3adfb8a3630ca56a49e4b309283f51caf2b01bfd Mon Sep 17 00:00:00 2001 From: Fangh Date: Thu, 1 Feb 2024 22:48:03 +0100 Subject: [PATCH] fix: delete files is on main thread --- Assets/Scripts/StorageManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/StorageManager.cs b/Assets/Scripts/StorageManager.cs index 31711bc..5ce5b80 100644 --- a/Assets/Scripts/StorageManager.cs +++ b/Assets/Scripts/StorageManager.cs @@ -73,7 +73,7 @@ private void RunDeleteTasks(List deleteTasks, Action callback_OnFinish) int taskCount = deleteTasks.Count; Debug.Log($"There are {taskCount} files to delete", this); - Task.WhenAll(deleteTasks).ContinueWith(_ => + Task.WhenAll(deleteTasks).ContinueWithOnMainThread(_ => { Debug.Log($"all delete tasks are done", this); callback_OnFinish?.Invoke();