Yooasset add destroy methods

增加销毁机制
This commit is contained in:
hevinci
2022-06-15 18:14:04 +08:00
parent 8deb239450
commit 0b1990f040
6 changed files with 48 additions and 7 deletions
+17 -5
View File
@@ -925,15 +925,27 @@ namespace YooAsset
#endregion
#region 内部方法
internal static void InternalDestroy()
{
_isInitialize = false;
_initializeError = string.Empty;
_initializeStatus = EOperationStatus.None;
_bundleServices = null;
_locationServices = null;
_editorSimulateModeImpl = null;
_offlinePlayModeImpl = null;
_hostPlayModeImpl = null;
OperationSystem.DestroyAll();
DownloadSystem.DestroyAll();
AssetSystem.DestroyAll();
YooLogger.Log("YooAssets destroy all !");
}
internal static void InternalUpdate()
{
// 更新异步操作系统
OperationSystem.Update();
// 更新下载管理系统
DownloadSystem.Update();
// 更新资源系统
AssetSystem.Update();
}