googleads-mobile-unity icon indicating copy to clipboard operation
googleads-mobile-unity copied to clipboard

OnUserEarnedReward is called after OnAdClosed in Unity editor

Open thsbrown opened this issue 4 years ago • 2 comments

Step 1: Describe your environment

  • Unity version: 2018.4.30
  • Google Mobile Ads Unity plugin version: 5.4.0
  • Platform: Unity Editor
  • Platform OS version: --
  • Any specific devices issue occurs on: Unity Editor
  • Mediation ad networks used, and their versions: --

Step 2: Describe the problem

Steps to reproduce:

OnUserEarnedReward event is called after OnAdClosed in editor. When built to device OnUserEarnedReward is called before OnAdClosed. After peeking around quite a bit online it seems as though OnUserEarnedReward should be called prior to OnAdClosed always. If this is the case the implementation in editor should reflect this :)

Relevant Code:

https://github.com/googleads/googleads-mobile-unity/blob/7a9bc72d6441edfe170fb9b4985cfbeede388772/source/plugin/Assets/GoogleMobileAds/Platforms/Unity/RewardingAdBaseClient.cs#L74-L84

thsbrown avatar Feb 22 '21 20:02 thsbrown

On top of what @thsbrown has mentioned, the RewardedAd prefab should have a button at all times to allow the user to close the ad without getting the reward.

pabloivars avatar Mar 17 '21 14:03 pabloivars

I am using Google Mobile Ads Unity Plugin v6.1.0 and the issue described above is reproducible on my end as well. OnUserEarnedReward ought to be called before OnAdClosed

KingKlauz avatar Aug 27 '21 06:08 KingKlauz

Since there were no recent activities for this issue, we are therefore reluctantly going to close this bug for now.

If you are still experiencing the problem, please file a new issue with the same description, what happens and system / network tracing / Charles logs.

All system setups can be slightly different, so it's always better to open new issues and reference the related ones. Thanks for your contribution.

kunny avatar Feb 06 '23 14:02 kunny