• 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 andrewwebber25 · Dec 01, 2017 at 09:22 PM · error messageadsadmobsendmessageunityads

Issue with Reward Ad Playing

Im sure my issue has been asked before so I apologize in advance. If someone can help me get this working, I will reward points!!!

Okay so I downloaded a file for this app im making. Its supposed to enable a reward ad for the specific app I am working on (the template im using for the app is made by the same guy with the downloaded pluggin) so I assume the code should all be correct as it works for him in the tutorial. Basically I have a button on my main menu that when clicked should show an ad and give the user 50 coins when finished watching it. Ill upload a pic of the Watch Video Button's Inspector Panel. You can see in the Inspector that the only thing to it is that "On Click" it is performing the "ServiceCalling.WatchVideoAd" from the ServiceCalling script (this script is attached to what appears to be an empty game object). Here is the code that is in the Service Calling Script:

 using UnityEngine;
 using System.Collections;
 
 public class ServiceManager : MonoBehaviour {
     public static ServiceManager Instance;
 
     private GameObject _AdsController, _UnityAds, _IAP, _Facebook;
 
     void Awake(){
         if (ServiceManager.Instance != null)
             Destroy (gameObject);    //just allow one adscontroller on scene over gameplay, even when you restart this level
         else {
             Instance = this;
             DontDestroyOnLoad (gameObject);
         }
     }
 
     // Use this for initialization
     void Start () {
 //        if (gameObject.transform.childCount == 0) {
 //            Debug.LogError ("There are no any service object, please read the Tutorial file to setup the service");
 //            return;
 //        }
 
 //        if (GameObject.Find ("AdsController") != null)
             _AdsController = GameObject.Find ("AdsController");
 //        if (GameObject.Find ("UnityAds") != null)
             _UnityAds = GameObject.Find ("UnityAds");
 //        
 //        
 ////        _IAP = transform.Find ("IAP").gameObject;
         _Facebook = GameObject.Find ("Facebook");
 
     }
 
     public void ShowAds(){
         if (_AdsController != null) {
 //            if (!GlobalValue.RemoveAds)
                 _AdsController.SendMessage ("ShowAds");
         }
         else
             Debug.Log ("There is no AdsController object in the scene, please read the Tutorial file for more information");
     }
 
     public void HideAds(){
         if (_AdsController != null)
             _AdsController.SendMessage ("HideAds");
         else
             Debug.Log ("There is no AdsController object in the scene, please read the Tutorial file for more information");
     }

public void ShowRewardAds(){ if (_UnityAds != null) _UnityAds.SendMessage ("ShowRewardVideo"); else Debug.Log ("There is no UnityAds object in the scene, please read the Tutorial file for more information"); }

So thats all the code. Now for the issue. When I click the Watch Video Button in my game I get this message.

SendMessage ShowRewardVideo has no receiver! UnityEngine.GameObject:SendMessage(String) ServiceManager:ShowRewardAds() (at Assets/Kong Hero/Script/ServiceManager.cs:54) ServiceCalling:WatchVideoAds() (at Assets/Kong Hero/Script/ServiceCalling.cs:15) UnityEngine.EventSystems.EventSystem:Update()

Does anyone know how to get the "reciever"? The first line in the error message comes directly from the ServiceManager Script (the other bolded bit above). There is a little bit more to it but Im sure I already gave an overwhelming amount of information. I apologize and if I cant get this fixed then ill have to find a new tutorial just for reward ads. Thank you so much guysalt text

capture.jpg (58.4 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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by kskjadav007 · Feb 22, 2020 at 11:33 AM

Check out this link

link text

link text

Comment
Add comment · Show 1 · 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
avatar image unity_NP_AqI6E1Ih4SA · Feb 24, 2020 at 06:13 PM 0
Share

Thanks for your response - I am not good at programming with C# and this is the code in the game:

Its supposed to enable a reward ad for the specific app I am working on (the template im using for the app is made by the same guy with the downloaded pluggin) so I assume the code should all be correct as it works for him in the tutorial. Basically I have a button on my main menu that when clicked should show an ad and give the user 50 coins when finished watching it. Ill upload a pic of the Watch Video Button's Inspector Panel. You can see in the Inspector that the only thing to it is that "On Click" it is performing the "ServiceCalling.WatchVideoAd" from the ServiceCalling script (this script is attached to what appears to be an empty game object). Here is the code that is in the Service Calling Script:

avatar image
0

Answer by unity_NP_AqI6E1Ih4SA · Feb 21, 2020 at 10:23 PM

Hi - I have the same problem. What is the solution that you found to solve this problem - Thanks ---- SendMessage ShowRewardVideo has no receiver! UnityEngine.GameObject:SendMessage(String) ServiceManager:ShowRewardAds() (at Assets/Kong Hero/Script/ServiceManager.cs:65) UnityEngine.EventSystems.EventSystem:Update()----alt text


shot399.png (30.6 kB)
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

75 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

Related Questions

Is it a good idea to use Admob alongside Unity Ads for banner ads? 0 Answers

Admob Loading "Dummy IsLoaded" 0 Answers

is there an advantage of creating multiple Ad units/ Placement of same type in Unity, Admob etc? 1 Answer

I got an error message after switching to the new ad ID in Unity. 0 Answers

How do you monetize games for Windows Phone, Windows (PC) and the Web? 0 Answers

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