update: 延迟启动广告服务

deeplink
胡宇飞 2024-03-18 15:38:11 +08:00
parent a962f7bb8c
commit 01008ca8c7
1 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,7 @@
using System.Threading.Tasks;
namespace Guru
{
using UnityEngine;
@ -111,9 +113,10 @@ namespace Guru
/// <param name="code"></param>
private void OnGuruConsentOver(int code)
{
// StartAdService(_adInitSpec);
// 无论状态如何, 都在回调内启动广告初始化
StartAdService(_adInitSpec);
OnDelayStartAdService(); // 延迟启动广告服务
// 调用回调
Callbacks.ConsentFlow._onConsentResult?.Invoke(code);
@ -132,7 +135,15 @@ namespace Guru
break;
}
}
private async void OnDelayStartAdService()
{
await Task.Delay(2000);
StartAdService(_adInitSpec);
}
#endregion
#region IOS ATT 广告授权流程