예제 #1
0
        public void Show(string placementId, IUnityAdsShowListener showListener)
        {
            // If placementId is null, use explicit defaultPlacement to match native behaviour
            if (m_Initialized && placementId == null)
            {
                placementId = m_Configuration.defaultPlacement;
            }

            m_Platform.UnityLifecycleManager.Post(() => {
                if (IsReady(placementId))
                {
                    m_Platform.UnityAdsDidStart(placementId);
                    showListener?.OnUnityAdsShowStart(placementId);
                    m_Placeholder.Show(placementId, m_Configuration.placements[placementId]);
                    m_PlacementMap[placementId] = false;
                }
                else
                {
                    m_Platform.UnityAdsDidFinish(placementId, ShowResult.Failed);
                    showListener?.OnUnityAdsShowFailure(placementId, UnityAdsShowError.NOT_READY, $"Placement {placementId} is not ready");
                }
            });
        }
예제 #2
0
 private void OnShowStart(string placementId)
 {
     m_UnityAdsInternalListener?.OnUnityAdsShowStart(placementId);
     m_UserListener?.OnUnityAdsShowStart(placementId);
 }
예제 #3
0
 public void onUnityAdsShowStart(string placementId)
 {
     m_Platform?.UnityAdsDidStart(placementId);
     m_ManagedListener?.OnUnityAdsShowStart(placementId);
 }