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 /
This question was closed Sep 29, 2017 at 02:57 PM by whaleinthesea for the following reason:

Problem is not reproducible or outdated

avatar image
1
Question by whaleinthesea · Sep 24, 2015 at 07:40 PM · c#adsunity adsadvertisingunity 5.2

Why is Unity Ads not showing an ad in unity 5.2?

I'm using Unity 5.2, and attached the following script to the main camera: using UnityEngine; using UnityEngine.Advertisements; using System.Collections;

 public class Ads : MonoBehaviour {
 
     // Use this for initialization
     void Start() {
         ShowAd();
     }
     public void ShowAd()
     {
         if (Advertisement.IsReady())
         {
             Advertisement.Show();
         }
     }
 }
 

Why is Unity Ads not showing an ad? What did I wrong? Thanks in advance.

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

5 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by whaleinthesea · Sep 26, 2015 at 09:58 AM

UnityAds have to download the ads first and that take some time, use

 IEnumerator ShowAd() {
         while (!Advertisement.IsReady()) {
             yield return null;
         }
         Advertisement.Show();
     }


to show the ad when it is downloaded

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 CezaryDevelopment · Dec 16, 2015 at 09:50 PM 0
Share

How would the full code look like? Im sorey but I dont usually use C#.

avatar image
2

Answer by jamiahuswalton · Oct 31, 2016 at 06:50 PM

I found that I needed to initialize my Advertisement before it started to work. After that, I needed to wait until my ad was ready to be displayed. Code snippet below.

alt text


capture.png (9.1 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
avatar image
1

Answer by Dragon_Developer · Sep 25, 2015 at 07:57 AM

UnityAds only works if you are on mobile, in the editor it wont work ;/

Comment
Add comment · Show 3 · 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 whaleinthesea · Sep 25, 2015 at 02:07 PM 0
Share

But why is Unity not showing this example 'ad' on this page: http://answers.unity3d.com/questions/1067354/how-to-use-the-new-unity-ads.html#answer-1067459 ?

avatar image Dragon_Developer whaleinthesea · Sep 25, 2015 at 02:25 PM 0
Share

Did you create an unityAds account (and linked it)?

avatar image whaleinthesea Dragon_Developer · Sep 25, 2015 at 02:56 PM 0
Share

yes, its automatically linked in Unity 5.2 EDIT: Even on my mobile it doesn't work.

avatar image
0

Answer by seth_slax · Sep 26, 2015 at 05:52 PM

In the editor it should show the default image to say that your ads are working. If this isn't the case, check UnityAds to make sure you have the latest version, and also check if it's compatible with Unity 5. Also throw in some Debug.Logs, particularly in an else statement underneath, like this:

     if (Advertisement.IsReady())
              {
                  Advertisement.Show();
              }
     else{
     Debug.Log("Advertisment is not ready.");
     }

Check the docs to make sure you've set it up properly, make sure you're not building with Dev Mode enabled, and make sure the little box on the Helper Script (if you're using it) is unchecked. Pretty sure it's something like Testing Mode.

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 angralon · Feb 12, 2016 at 01:50 PM 0
Share

I had the same problem and tried for some time.

In the end i found out, that the default Zone name is not "rewardedVideoZone" but "rewardedVideo".

So yeah, configuration error.

avatar image
0

Answer by HappySaila · Mar 02, 2017 at 10:42 AM

FIXED!

After fiddling around a lot I found the solution.

In Unity Ads > click on your game > Click on your game store listing (eg the tab that has your game ID in > Click on settings next to ad filtering > And turn "Override client test mode OFF!

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 TheKingOfTheRoad · Jun 06, 2018 at 12:43 AM 0
Share

For all with this problem: Test Ads in Fresh Project. It can be project settings.

Follow this Question

Answers Answers and Comments

35 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

Related Questions

Unity Ads Banner not working. 0 Answers

Unity rewarded ad is not giving reward 0 Answers

Unity ads ecpm went high then back to really low 0 Answers

Chartboost adds are not showing up on android 0 Answers

Help implementing unity ads 1 Answer


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