Remove auto release interval create param.

移除了自动释放资源的初始化参数。
pull/9/head
hevinci 2022-05-03 12:33:28 +08:00
parent 9ec841ff67
commit 1c1bb078b1
1 changed files with 0 additions and 23 deletions

View File

@ -43,12 +43,6 @@ namespace YooAsset
/// </summary>
public IDecryptionServices DecryptionServices = null;
/// <summary>
/// 资源系统自动释放零引用资源的间隔秒数
/// 注意如果小于等于零代表不自动释放可以使用YooAssets.UnloadUnusedAssets接口主动释放
/// </summary>
public float AutoReleaseInterval = -1;
/// <summary>
/// 资源加载的最大数量
/// </summary>
@ -109,9 +103,6 @@ namespace YooAsset
private static OfflinePlayModeImpl _offlinePlayModeImpl;
private static HostPlayModeImpl _hostPlayModeImpl;
private static float _releaseTimer;
private static float _releaseCD = -1f;
/// <summary>
/// 异步初始化
@ -156,9 +147,6 @@ namespace YooAsset
YooLogger.Warning($"{nameof(parameters.OperationSystemMaxTimeSlice)} minimum value is 33 milliseconds");
}
if (parameters.AutoReleaseInterval > 0)
_releaseCD = parameters.AutoReleaseInterval;
// 运行模式
if (parameters is EditorPlayModeParameters)
_playMode = EPlayMode.EditorPlayMode;
@ -844,17 +832,6 @@ namespace YooAsset
// 轮询更新资源系统
AssetSystem.Update();
// 自动释放零引用资源
if (_releaseCD > 0)
{
_releaseTimer += UnityEngine.Time.unscaledDeltaTime;
if (_releaseTimer >= _releaseCD)
{
_releaseTimer = 0f;
AssetSystem.UnloadUnusedAssets();
}
}
}
internal static string MappingToAssetPath(string location)
{