• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by tolgaguducu · Feb 27, 2019 at 02:57 PM · adsadmob

Rewarded video ads rewarding player too much

     using UnityEngine;
     using System;
     using GoogleMobileAds.Api;
     using UnityEngine.UI;

     public class ReklamRewardedVideo1 : MonoBehaviour
    {
     public Button reklamButton;
     private int gemsReklam;
    
     
     void Start()
     {
        
         MobileAds.Initialize("ca-app***************************************");
         YeniReklamAl(null, null);
 
         RewardBasedVideoAd reklamObjesi = RewardBasedVideoAd.Instance;
         reklamObjesi.OnAdClosed -= YeniReklamAl;
         reklamObjesi.OnAdClosed += YeniReklamAl; // Kullanıcı reklamı kapattıktan sonra çağrılır
         reklamObjesi.OnAdRewarded -= OyuncuyuOdullendir;
         reklamObjesi.OnAdRewarded += OyuncuyuOdullendir; // Kullanıcı reklamı tamamen izledikten sonra çağrılır
     }
     public void reklamReward()
     {
         reklamButton.enabled = RewardBasedVideoAd.Instance.IsLoaded();
         RewardBasedVideoAd.Instance.Show();
         reklamButton.enabled = true;
         
     }
     
     
 
     public void YeniReklamAl(object sender, EventArgs args)
     {
         RewardBasedVideoAd reklamObjesi = RewardBasedVideoAd.Instance;
 
         AdRequest reklamIstegi = new AdRequest.Builder().Build();
         reklamObjesi.LoadAd(reklamIstegi, "ca-app**********************************");
     }
 
     private void OyuncuyuOdullendir(object sender, Reward args)
     {
         gemsReklam = PlayerPrefs.GetInt("gems", 0);
        PlayerPrefs.SetInt("gems",gemsReklam+25);
     }
 }

here is my rewarded video ads code. It's been called when player clicks a button. It's working properly. But my biggest problem is that: It never gives 25 gems as a reward. I want it to give 25 gems as reward. but by using this code , I get 50 gems as a reward at first rewardedads, 50 gems at second click. After that I go to a level and play game a little bit. I came back to this scene and watch 3rd rewardedads and it gives 125 gems, 4th reward is 175 gems.. It goes in that way. never gives 25 gems as reward and it is like giving rewards randomly. please help me to fix this. what am I missing here?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by eraban · Nov 27, 2020 at 04:22 PM

@tolgaguducu Have you found the solution yet. I myself been having this problem. Please tell me the solution if you have solved it.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

102 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Admob Ads shown only after second request 0 Answers

Admob Banner Ads not shown but are clickable 1 Answer

Android Banner disappears after touching the screen 2 Answers

Requirements for GDPR Consent Meta Data - Admob Mediation 0 Answers

after compiling the game "(app's name) keeps stopping" 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges