mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-29 20:48:47 +00:00
update runtime code
This commit is contained in:
@@ -27,6 +27,7 @@ namespace YooAsset
|
|||||||
_driver = new UnityEngine.GameObject($"[{nameof(YooAssets)}]");
|
_driver = new UnityEngine.GameObject($"[{nameof(YooAssets)}]");
|
||||||
_driver.AddComponent<YooAssetsDriver>();
|
_driver.AddComponent<YooAssetsDriver>();
|
||||||
UnityEngine.Object.DontDestroyOnLoad(_driver);
|
UnityEngine.Object.DontDestroyOnLoad(_driver);
|
||||||
|
YooLogger.Log($"{nameof(YooAssets)} initialize !");
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
// 添加远程调试脚本
|
// 添加远程调试脚本
|
||||||
@@ -55,11 +56,10 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
_packages.Clear();
|
_packages.Clear();
|
||||||
|
|
||||||
|
_isInitialize = false;
|
||||||
if (_driver != null)
|
if (_driver != null)
|
||||||
GameObject.Destroy(_driver);
|
GameObject.Destroy(_driver);
|
||||||
|
YooLogger.Log($"{nameof(YooAssets)} destroy all !");
|
||||||
_isInitialize = false;
|
|
||||||
YooLogger.Log("YooAssets destroy all !");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user