release: 1.0.12

This commit is contained in:
2026-04-22 17:41:45 +08:00
parent 377a279ac3
commit 957c4e4045
5 changed files with 134 additions and 16 deletions

View File

@@ -10,6 +10,8 @@ namespace Runtime.ADAggregator
private bool firstLoad;
private bool isKill;
private bool isUpdate;
private int loadAttempts;
private float nextLoadRetryTime;
private AdTimeHandler overHandler;
private string _Ad_scene;
@@ -23,6 +25,8 @@ namespace Runtime.ADAggregator
this._callback = callback;
this.isKill = false;
this.firstLoad = true;
this.loadAttempts = 0;
this.nextLoadRetryTime = 0f;
this._adPlayer = player;
if (_adPlayer == null)
{
@@ -36,6 +40,7 @@ namespace Runtime.ADAggregator
ADManager.Instance.OpenMask();
_adPlayer.OnErrorAction = OnError;
_adPlayer.AdScene = this._Ad_scene;
_adPlayer.OnPlayRequestStarted();
isUpdate = true;
ADManager.Instance.AddUpdater(DoUpdate);
}
@@ -83,14 +88,20 @@ namespace Runtime.ADAggregator
}
else if(!_adPlayer.IsLoading())
{
if (firstLoad)
if (loadAttempts < _adPlayer.MaxLoadAttempts)
{
if (this._outTime < nextLoadRetryTime)
{
return;
}
#if UNITY_EDITOR
Debug.LogError("开始加载广告: " + this._adPlayer.Key);
#endif
this._outTime = 0;
_adPlayer.LoadAD();
loadAttempts++;
firstLoad = false;
nextLoadRetryTime = this._outTime + _adPlayer.LoadRetryDelaySeconds;
}
else
{