Search Unity

Bug Callbacks are called more and more often

Discussion in 'Unity Ads & User Acquisition' started by Faic, Dec 8, 2021.

  1. Faic

    Faic

    Joined:
    Jun 2, 2015
    Posts:
    20
    I implemented the example from https://unityads.unity3d.com/help/unity/integration-guide-unity#basic-implementation for rewarded videos for Advertising 4.0.0.

    The problem I have is that every time I click the test ad in the editor more and more callbacks are called. First 1 then 2, 3, 4 ...

    Is the example wrong in using Advertisement.Load(adUnit,this) every single time instead of omitting the "this" for future times? Am I just piling listeners on top of each other? But then how to implement it properly, check if I get a callback and then use Advertisement.Load(adUnit) instead?

    Or bug, if we assume the example is correct?
     
    D12294 and Rainis21 like this.
  2. shshwdr

    shshwdr

    Joined:
    Mar 7, 2014
    Posts:
    7
    I'm having the same problem. What I did is hacky, just give the listener a bool and set it to true when show ads, to set to false when ads finished. It is still problematic because the listeners get more and more but my game is super small so should be fine now...
    I want to know if there is a real fix for this. Thanks!!
     
    D12294 likes this.
  3. Jason_YLin

    Jason_YLin

    Unity Technologies

    Joined:
    Sep 30, 2021
    Posts:
    15
    Hi @Faic and @shshwdr, did you see this issue in the Unity Editor(simulator) or on the real device?
    This issue should only occurs in the Unity Editor and will not affect to the production environment(app running on mobile device).
    Our team has discovered the issue and is working toward to resolve the issue.

    Sorry for the inconvenience and thank you for understanding.
     
    Cloud-Yo and D12294 like this.
  4. Faic

    Faic

    Joined:
    Jun 2, 2015
    Posts:
    20
    Never checked it on the real device, only tested it in the editor.
    Ok, then I will revert my code back to follow the example.
     
  5. Cloud-Yo

    Cloud-Yo

    Joined:
    Sep 5, 2014
    Posts:
    12
    Encountering this on Unity 2020.3.25f1, good to know its being worked on and its limited to the Editor.
     
  6. dtootill

    dtootill

    Joined:
    Oct 9, 2020
    Posts:
    29
    While it's good to know that Unity Technologies is working on correcting this problem, it'd be a whole lot easier all round if they could just add back the old AddListener method. Then developers could set up load and show listeners during initialization and neither they nor Unity Technologies would need to check for duplicates with every call to Load() or Show()
     
  7. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    This is only an issue with the editor test versions, on the device itself I don't have the problem.

    Cmon Unity, these small mistakes in your SDK/Examples cost us a lot of time and frustration. It cost me over an hour trying to figure out if I'd done something wrong.