예제 #1
0
    void RewardedVideoAdClosedEvent()
    {
        Debug.Log("unity-script: I got RewardedVideoAdClosedEvent");

        if (ironSourceSsp != null)
        {
            // The impression data from MoPub does contain additional parameters that haven't been added
            // to the adImpression event in this example, but it you could extend this event in the Event Manager tool to accomodate them.
            //Debug.Log("Impression Data" + impressionData.JsonRepresentation.ToString());

            Debug.Log("Recording adImpression event");

            GameEvent adEvent = new GameEvent("adImpression")
                                .AddParam("adProvider", "IronSource ")
                                .AddParam("placementType", "REWARDED AD")
                                .AddParam("placementId", ironSourceSsp.getPlacementName())
                                .AddParam("placementName", ironSourceSsp.getPlacementName())
                                .AddParam("adCompletionStatus", ironSourceCompletionStatus);

            // Add impression value if available. Multiplying publisher revenue by 1000 to get CPM value
            if (ironSourceImpressionData != null)
            {
                adEvent.AddParam("adEcpmUsd", System.Convert.ToDouble(ironSourceImpressionData.revenue) * 1000);
            }

            DDNA.Instance.RecordEvent(adEvent).Run();
            ironSourceSsp            = null;
            ironSourceImpressionData = null;
        }
    }
예제 #2
0
파일: SdkMgr.cs 프로젝트: lxynb/MiniGame
 void onRewardedVideoAdRewardedEvent(IronSourcePlacement ssp)
 {
     sspPlacementName           = ssp.getPlacementName();
     isPlayRewardedVideoSuccess = true;
     print("(2)  #########   onRewardedVideoAdRewardedEvent " + sspPlacementName);
     InvokeRewardVideoCallback();
 }
예제 #3
0
 //Invoked when the user completed the video and should be rewarded.
 //If using server-to-server callbacks you may ignore this events and wait for the callback from the  ironSource server.
 //
 //@param - placement - placement object which contains the reward data
 //
 void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     Debug.Log("SDK:IronSourceSDK >>>> RewardedVideoAdRewardedEvent placement:" + placement.ToString());
     //Placement can return null if the placementName is not valid.
     if (placement != null)
     {
         String placementName = placement.getPlacementName();
         String rewardName    = placement.getRewardName();
         int    rewardAmount  = placement.getRewardAmount();
         this.InvokeRewardedVideoHandlerAndClean(ADResult.RewardedVideoResult.REWARDED);
     }
 }
예제 #4
0
 private void HandleRewardedVideoAdRewarded(IronSourcePlacement placement)
 {
     _audioManager.Mute(false);
     _adsDispatcher.OnRewardVideoComplete.Invoke(placement.getPlacementName());
     _timeDispatcher.OnGameplayPause.Invoke(false);
 }