Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    81
    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.