From abdf2b859e181eb2735b370858f58e3da89732d1 Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 4 Apr 2022 22:43:42 +0800 Subject: [PATCH] Update YooAssetDriver.cs --- Assets/YooAsset/Runtime/YooAssetDriver.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Assets/YooAsset/Runtime/YooAssetDriver.cs b/Assets/YooAsset/Runtime/YooAssetDriver.cs index 492458d..0aac75d 100644 --- a/Assets/YooAsset/Runtime/YooAssetDriver.cs +++ b/Assets/YooAsset/Runtime/YooAssetDriver.cs @@ -2,11 +2,16 @@ namespace YooAsset { - internal class YooAssetDriver : MonoBehaviour - { - void Update() - { - YooAssets.InternalUpdate(); - } - } + internal class YooAssetDriver : MonoBehaviour + { + void Update() + { + YooAssets.InternalUpdate(); + } + + void OnApplicationQuit() + { + DownloadSystem.DestroyAll(); + } + } } \ No newline at end of file