parent
6038e7acd6
commit
a290353cfa
|
@ -73,15 +73,15 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
provider.Destroy();
|
provider.Destroy();
|
||||||
}
|
}
|
||||||
|
_providers.Clear();
|
||||||
|
|
||||||
foreach (var loader in _loaders)
|
foreach (var loader in _loaders)
|
||||||
{
|
{
|
||||||
loader.Destroy(true);
|
loader.Destroy(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
_providers.Clear();
|
|
||||||
_loaders.Clear();
|
_loaders.Clear();
|
||||||
ClearSceneHandle();
|
|
||||||
|
|
||||||
|
ClearSceneHandle();
|
||||||
DecryptionServices = null;
|
DecryptionServices = null;
|
||||||
BundleServices = null;
|
BundleServices = null;
|
||||||
}
|
}
|
||||||
|
@ -298,19 +298,21 @@ namespace YooAsset
|
||||||
internal void ClearSceneHandle()
|
internal void ClearSceneHandle()
|
||||||
{
|
{
|
||||||
// 释放资源包下的所有场景
|
// 释放资源包下的所有场景
|
||||||
string packageName = BundleServices.GetPackageName();
|
if (BundleServices.IsServicesValid())
|
||||||
List<string> removeList = new List<string>();
|
|
||||||
foreach (var valuePair in _sceneHandles)
|
|
||||||
{
|
{
|
||||||
if (valuePair.Value.PackageName == packageName)
|
string packageName = BundleServices.GetPackageName();
|
||||||
|
List<string> removeList = new List<string>();
|
||||||
|
foreach (var valuePair in _sceneHandles)
|
||||||
{
|
{
|
||||||
removeList.Add(valuePair.Key);
|
if (valuePair.Value.PackageName == packageName)
|
||||||
|
{
|
||||||
|
removeList.Add(valuePair.Key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (var key in removeList)
|
||||||
|
{
|
||||||
|
_sceneHandles.Remove(key);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var key in removeList)
|
|
||||||
{
|
|
||||||
_sceneHandles.Remove(key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
private void ResetInitializeAfterFailed()
|
private void ResetInitializeAfterFailed()
|
||||||
{
|
{
|
||||||
if(_isInitialize && _initializeStatus == EOperationStatus.Failed)
|
if (_isInitialize && _initializeStatus == EOperationStatus.Failed)
|
||||||
{
|
{
|
||||||
_isInitialize = false;
|
_isInitialize = false;
|
||||||
_initializeStatus = EOperationStatus.None;
|
_initializeStatus = EOperationStatus.None;
|
||||||
|
|
|
@ -78,6 +78,10 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
return _simulatePatchManifest.IsIncludeBundleFile(fileName);
|
return _simulatePatchManifest.IsIncludeBundleFile(fileName);
|
||||||
}
|
}
|
||||||
|
bool IBundleServices.IsServicesValid()
|
||||||
|
{
|
||||||
|
return _simulatePatchManifest != null;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -428,6 +428,10 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
return LocalPatchManifest.IsIncludeBundleFile(fileName);
|
return LocalPatchManifest.IsIncludeBundleFile(fileName);
|
||||||
}
|
}
|
||||||
|
bool IBundleServices.IsServicesValid()
|
||||||
|
{
|
||||||
|
return LocalPatchManifest != null;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -129,6 +129,10 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
return _appPatchManifest.IsIncludeBundleFile(fileName);
|
return _appPatchManifest.IsIncludeBundleFile(fileName);
|
||||||
}
|
}
|
||||||
|
bool IBundleServices.IsServicesValid()
|
||||||
|
{
|
||||||
|
return _appPatchManifest != null;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -42,5 +42,10 @@ namespace YooAsset
|
||||||
/// 是否包含资源文件
|
/// 是否包含资源文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsIncludeBundleFile(string fileName);
|
bool IsIncludeBundleFile(string fileName);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务接口是否有效
|
||||||
|
/// </summary>
|
||||||
|
bool IsServicesValid();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue