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 namespace Guru
{ {
using UnityEngine; using UnityEngine;
@ -112,8 +114,9 @@ namespace Guru
private void OnGuruConsentOver(int code) private void OnGuruConsentOver(int code)
{ {
// StartAdService(_adInitSpec);
// 无论状态如何, 都在回调内启动广告初始化 // 无论状态如何, 都在回调内启动广告初始化
StartAdService(_adInitSpec); OnDelayStartAdService(); // 延迟启动广告服务
// 调用回调 // 调用回调
Callbacks.ConsentFlow._onConsentResult?.Invoke(code); Callbacks.ConsentFlow._onConsentResult?.Invoke(code);
@ -133,6 +136,14 @@ namespace Guru
} }
} }
private async void OnDelayStartAdService()
{
await Task.Delay(2000);
StartAdService(_adInitSpec);
}
#endregion #endregion
#region IOS ATT 广告授权流程 #region IOS ATT 广告授权流程