--story=1019658 --user=yufei.hu

[中台] [Editor] 修复SDK 切换到 iOS 后, 运行项目卡死的问题
deeplink
胡宇飞 2024-04-29 00:39:38 +08:00
parent 0c88e35f24
commit 1ecd077085
4 changed files with 11 additions and 3 deletions

View File

@ -53,7 +53,7 @@ namespace Guru
public void Initialize() public void Initialize()
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
Debug.Log($"<color=orange>=== PubMatic will not init on Editor ===</color>"); Debug.Log($"<color=orange>=== PubMatic will not init on Editor ===</color>");
#endif #endif
if (!IsEnabled) if (!IsEnabled)
{ {

View File

@ -78,7 +78,10 @@ namespace Guru
channel.Initialize(); channel.Initialize();
_adChannels.Add(channel); // PubMatic _adChannels.Add(channel); // PubMatic
#if UNITY_EDITOR
Debug.Log($"---- Editor Ads Init Over ----");
_onSdkInitReady?.Invoke();
#endif
} }
#endregion #endregion

View File

@ -24,7 +24,7 @@ namespace Guru
private bool _isServiceStarted; private bool _isServiceStarted;
private Action _onSdkInitReady; protected Action _onSdkInitReady;
public static Action OnBannerLoaded; public static Action OnBannerLoaded;

View File

@ -106,7 +106,12 @@ namespace Guru
{ {
if (_hasGotAdjustId) return; if (_hasGotAdjustId) return;
#if UNITY_EDITOR
string adjustId = "editor_fake_adjust_id";
#else
string adjustId = AdjustService.AdjustId; string adjustId = AdjustService.AdjustId;
#endif
if (!string.IsNullOrEmpty(adjustId)) if (!string.IsNullOrEmpty(adjustId))
{ {
IPMConfig.ADJUST_ID = adjustId; IPMConfig.ADJUST_ID = adjustId;