Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Unity Ad

Discussion in 'Unity Ads & User Acquisition' started by bratan20000, Dec 19, 2021.

Thread Status:
Not open for further replies.
  1. bratan20000

    bratan20000

    Joined:
    Oct 28, 2021
    Posts:
    12
    I have button that show rewarded ads and load other scene after ad. Also rewarded ad script have IUnityAdsShowListener interface, so I can check whether ad completed. When push the button at the first time all is good, but in second time result double. In this example "REWARDED AD" will be printed twice, on third push result will be printed three times and so on.
    What's problem?
    Code (CSharp):
    1.     public void OnUnityAdsShowComplete(string placementId, UnityAdsShowCompletionState showCompletionState)
    2.     {
    3.         if (placementId.Equals(_androidName) && showCompletionState == UnityAdsShowCompletionState.COMPLETED)
    4.         {
    5.             Debug.Log("REWARDED AD");
    6.         }
    7.         else
    8.         {
    9.          
    10.         }
    11.     }
     
  2. D12294

    D12294

    Joined:
    Oct 6, 2020
    Posts:
    71
    Last edited: Dec 25, 2021
    bratan20000 likes this.
  3. bratan20000

    bratan20000

    Joined:
    Oct 28, 2021
    Posts:
    12
    Oh, thank!
    In build version it is really works.
     
    Jason_YLin likes this.
Thread Status:
Not open for further replies.