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 /
avatar image
0
Question by KulwinderSingh · Mar 25, 2017 at 08:52 AM · unityadsunity android

Unity ads not initializing automatically ?

i am using unity reward based ads in my android/ios game. but when i check it

Advertisement.IsReady (rewardVideoID)

always return false because in ads script if check in Awake unity ads initialization is false

void Awake ()
{
Debug.Log ("Unity ads ini state : " + Advertisement.isInitialized); //it is false everytime
}


here i want to know why unity ads are not auto initializing. i used unity ads in my previous project it is initializing automatically
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
1

Answer by venezuelanroads · Apr 09, 2017 at 05:32 AM

Well, I had the same problem, I think that's a bug. I fixed it by initializating it manually.

You can add this to your ad manager, or just create a new one:

 using UnityEngine;
 using UnityEngine.Advertisements;
 
     public class UnityAdsInitializer : MonoBehaviour
     {
         [SerializeField]
         private string
             androidGameId = "18658",
             iosGameId = "18660";
     
         [SerializeField]
         private bool testMode;
     
         void Start ()
         {
             string gameId = null;
     
             #if UNITY_ANDROID
             gameId = androidGameId;
             #elif UNITY_IOS
             gameId = iosGameId;
             #endif
     
             if (Advertisement.isSupported && !Advertisement.isInitialized) {
                 Advertisement.Initialize(gameId, testMode);
             }
         }
     }

;D

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 thedarcsage · Sep 17, 2017 at 11:13 PM 0
Share

Thanks! Although it worked previously (I think it was with automatic initialization), I had to manually set the GameIds in this way, and it worked for me in Unity 2017.1

avatar image
0

Answer by wallacewakko · Aug 30, 2018 at 07:43 PM

Had to thank you since you give the clue I need to find the problem I was having with Heyzap and UnityAds. Basically I was implementing the Heyzap SDK on an old project, with have using only the UnityAds. All the other services I implemented was dispatching the events for rewarded videos, except UnityAds.

The point is: In the Projects/UnityConnectSettings the connection for me was set to initialize automatically, and the Services component in Unity doens't show to you anything about this on Unity 2017.4.6f. I was searching for something for 4 days to solve this problem, until I reach this topic. I was not using Advertisement.Initialize anymore like you, but I remember that Unity could start automatically and them I could figure out the problem.

Heyzap Dashboard doesn't have nothing about this, on internet nobody said anything about it, so I'm just making this registration for history. Thanks. :)

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

7 People are following this question.

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

Related Questions

Need help to select Unity3d publishing for iOS and android 1 Answer

Unity Build stops some of the working functionalities. 0 Answers

Unity Pro 4.6.8 MAC OSX El Capitan Last version of XCODE and Facebook SDK 0 Answers

unable to merge android manifests 0 Answers

Activating all powerups at once is glitching my powerups 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