Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
1
Question by superboltgames · Aug 29, 2016 at 01:39 PM · unity 5unity5unityeditoradsservice

Unity Ads not showing in editor (dummy ad placement is not showing too) as well as in the build.

So this is not first time I've used Unity Ads, I've turned on ADS from Services window. Made an AdsManager class which looks like this:

public class AdsManager : MonoBehaviour { public delegate void OnVideoAdFinishListener(); public static event OnVideoAdFinishListener onVideoAdFinishListener;

 public void VideoAdFinishListener()
 {
     if (onVideoAdFinishListener != null)
         onVideoAdFinishListener ();
 }

 public void ShowRewardedAd()
 {
     print ("Showing Ad");
     if (Advertisement.IsReady ("rewardedVideo")) {
         var options = new ShowOptions { resultCallback = HandleShowResult };
         Advertisement.Show ("rewardedVideo", options);
     } 
     else 
     {
         Debug.Log ("Ad Not ready");
     }
 }

 private void HandleShowResult(ShowResult result)
 {
     switch (result) {
     case ShowResult.Finished:
         Debug.Log ("The ad was successfully shown.");
         VideoAdFinishListener ();
         break;
     case ShowResult.Skipped:
         Debug.Log ("The ad was skipped before reaching the end.");
         break;
     case ShowResult.Failed:
         Debug.LogError ("The ad failed to be shown.");
         break;
     }
 }


Plain and simple. Everything is in place. I have a decent internet connection as well.

But even in editor, it tells me "Ad not ready", which is supposed to be the blue colored dummy Ad.

There's no ad on the build as well. I don't know what's going on here. This is the first time I've faced such a problem. Can anyone help me here?

Thank you!

Comment
Add comment · Show 1
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 JeremiahHP · Oct 02, 2016 at 11:40 PM 0
Share

Having this same problem

my code:

 using UnityEngine;
 using UnityEngine.Advertisements;
 using System.Collections;
 
 public class Ad$$anonymous$$anager : $$anonymous$$onoBehaviour
 {
     public void ShowAd()
     {
         StartCoroutine(ShowAdWhenReady());
         Debug.Log("Ad was called! ");
     }
 
     IEnumerator ShowAdWhenReady()
     {
         while (!Advertisement.IsReady())
         {
             yield return new WaitForSeconds(0.5f);
             Debug.Log("Ad not readyn! ");
         }
         Advertisement.Show();
     }
 }

I even posted about it here: https://forum.unity3d.com/threads/ads-never-ready-in-editor.434439/

but still no solution

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by frankslater · Oct 17, 2016 at 05:40 PM

Can you include some debugging? I'm guessing it doesn't get initialized by some reason. Include something like:

 public void ShowRewardedAd() {
     Debug.Log(string.Format("Platform is {0}supported\nUnity Ads {1}initialized",
         Advertisement.isSupported ? "" : "not ", Advertisement.isInitialized ? "" : "not "));
 
     if (Advertisement.IsReady ("rewardedVideo")) {
         var options = new ShowOptions { resultCallback = HandleShowResult };
         Advertisement.Show ("rewardedVideo", options);
     } 
     else {
         Debug.Log ("Ad Not ready");
     }
 }

 











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
avatar image
0

Answer by HappySaila · Mar 01, 2017 at 05:52 PM

Okay. I fixed this after hours of fiddling.

First: Do everything you were told to-do in the code samples.

Second: Import the following -> using UnityEngine.Advertisements; using UnityEditor.Advertisements; using UnityEngine.Purchasing;

Third (And probably the step you missed): Go to the unity ads services. (command.control - 0) Go advanced. Assign your game Id in unity services ad tab.

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.

Follow this Question

Answers Answers and Comments

111 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

Related Questions

How to Setactive(true) the other class ? 0 Answers

enable ads services in unity editor vs using Unity Monetization in the asset store! 0 Answers

Unity Ads when Internet not available in starting game , how i can iInitialize, in during game when internet be available? 0 Answers

The camera only sees the skybox 0 Answers

Can someone please help me fix the script? in unity3D to move forwards and backwards by swiping to the screen,Rotate and move forward script not working 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges