mirror of https://github.com/tuyoogame/YooAsset
parent
9ec841ff67
commit
1c1bb078b1
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue