• 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
0
Question by eni_cay · Jan 17 at 04:45 PM · errorvisual studioadmob

error implementing admob ads

i implemented admob ads and everything works fine banner and video ads show just fine , the problem is the reward that the player has to take isn't connected to the ad itself , but the button the player press to watch the ad , i tried showing a panel to notify player that he won a reward after watching the ad but nothing shows , the player just receives the reward and the ad has nothing to do with it , i followed tutorials on youtube exactly , their code worked fine but mine doesn(t work evern though i did exactly the same .........so i chacked my code in visual studio and there was these errors : -code sample : void Start() {

         MobileAds.Initialize(APP_ID);
         this.RewardvideoAD = RewardBasedVideoAd.Instance;
         this.RequestBanner();
         this.RequestRewardBasedVideoAd();
         ShowBannerAd();
         Debug.Log("banner ad on display ");
 
         //----------------------------------------------------------Video AD Subscription 
 
         // Called when an ad request has successfully loaded.
         this.RewardvideoAD.OnAdLoaded += HandleRewardedAdLoaded;
 
         // Called when an ad request failed to load.
         this.RewardvideoAD.OnAdFailedToLoad += 
          HandleRewardedAdFailedToLoad;
 
         // Called when an ad is shown.
         this.RewardvideoAD.OnAdOpening += HandleRewardedAdOpening;
 
         // Called when an ad request failed to show.
         this.RewardvideoAD.OnAdFailedToShow += HandleRewardedAdFailedToShow;
 
       // Called when the user should be rewarded for interacting with the ad.
         this.RewardvideoAD.OnUserEarnedReward += HandleUserEarnedReward;
 
         // Called when the ad is closed.
         this.RewardvideoAD.OnAdClosed += HandleRewardedAdClosed;
     }

errors : alt text

onfailedtoload has redline all over , and two red lines under OnFailedToShow and OnUserEarnedReward , so generated a field for them on visual studio but still the same , any ideas ?thank you

nh.png (23.7 kB)
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

0 Replies

· Add your reply
  • Sort: 

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

155 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 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

ClassNotFoundException on UnityPlayerProxyActivity on some devices 0 Answers

Error building Player: Win32Exception [Solved] 4 Answers

NullReferenceException: SerializedObject of SerializedProperty has been Disposed 2 Answers

Visual studio says no issues found even though there are errors. 1 Answer

after i imported admob to my android unity project and edited the code, error occured,after i imported admob to my android unity project, error occured 1 Answer

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