public void Load(string placementId, IUnityAdsLoadListener loadListener) { // If placementId is null, use explicit defaultPlacement to match native behaviour if (m_Initialized && placementId == null) { placementId = m_Configuration.defaultPlacement; } if (!m_Initialized) { m_QueuedLoads?.Enqueue(placementId); return; } m_Platform.UnityLifecycleManager.Post(() => { if (m_PlacementMap.ContainsKey(placementId)) { m_PlacementMap[placementId] = true; m_Platform.UnityAdsReady(placementId); loadListener?.OnUnityAdsAdLoaded(placementId); } else { string errorMessage = "Placement " + placementId + " does not exist for gameId: " + m_GameId; m_Platform.UnityAdsDidError(errorMessage); loadListener?.OnUnityAdsFailedToLoad(placementId, UnityAdsLoadError.INVALID_ARGUMENT, errorMessage); } }); }
public void onUnityAdsAdLoaded(string placementId) { m_Platform?.UnityAdsReady(placementId); m_ManagedListener?.OnUnityAdsAdLoaded(placementId); }
private void OnLoadSuccess(string placementId) { m_UnityAdsInternalListener?.OnUnityAdsAdLoaded(placementId); m_UserListener?.OnUnityAdsAdLoaded(placementId); }