Search Unity

Monetization 3.0.3 can't connect but ok on editor

Discussion in 'Unity Ads & User Acquisition' started by Leking006, Mar 23, 2019.

  1. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    It seems that my game can't connect to the unity ads server server on Android Build but ok on editor.
    I am using Monetization 3.0.3 and Unity 2018.3.8, any idea how can i fix this?
     
  2. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Hello, please, can you share the logs?
     
  3. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    Hi How can I get the Log for the Build? BTW It work but just for a little time then it disconnected again after tha Ad is finished,.

    BTW I am using this code to check If am connected or not.

    Code (CSharp):
    1.     void Update()
    2.     {
    3.  
    4.         if (!Monetization.IsReady("video"))
    5.         {
    6.             validation.GetComponent<Text>().text = " Ads are not working";
    7.  
    8.         }
    9.         else
    10.         {
    11.             validation.GetComponent<Text>().text = " Ads are working";
    12.         }
    13.  
    14.         if (!Advertisement.IsReady("bannerAd"))
    15.         {
    16.             validation.GetComponent<Text>().text += " Banner Ads are not working";
    17.  
    18.         }
    19.         else
    20.         {
    21.             validation.GetComponent<Text>().text += " Banner Ads are working";
    22.         }
    23.  
    24.     }
    Videos connects for a little time, but Banner does not connect at all
     
    Last edited: Mar 23, 2019
  4. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    For example, you can download Android Studio(with ADB), and use it for capturing an logcat from a device.
     
  5. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    Ah ok thanks, I will try this and post the log here.
     
    DenisasK likes this.
  6. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    How do you init Monetization SDK? Are you using AssetStore package?
     
  7. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    Hi, I am using the Monetization 3.0.3 of Asset Store.

    I init Monetization using this

    Code (CSharp):
    1.    void Start()
    2.     {
    3.         Monetization.Initialize(gameId, testMode);
    4.  
    5.     }
    I init banner using this
    Code (CSharp):
    1.    void Start()
    2.     {
    3.         Advertisement.Initialize(gameID, testMode);
    4.         StartCoroutine(ShowBannerWhenReady());
    5.     }
    6.  
    7.     IEnumerator ShowBannerWhenReady()
    8.     {
    9.         while (!Advertisement.IsReady("bannerAd"))
    10.         {
    11.             yield return new WaitForSeconds(0.5f);
    12.         }
    13.         Advertisement.Banner.Show(bannerPlacement);
    14.     }
     
  8. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Your code for the banner ads looks good. Most probably, you get no fill. You can read more about "no fill"(regarding banners) here:
    https://forum.unity.com/threads/could-not-show-banner-due-to-no-fill-for-placement.610948/
    and here is a piece of general information: https://unityads.unity3d.com/help/resources/statistics#fill-rate
     
  9. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    Thanks. But i debug and the Main Problem besides banner ads not showing is it can't connect to the Unity Ads placement server for a longer period, it only connects for seconds then disconnected. But when I am using the old Unity Ads Version (Unity Ads 2.8 from Unity Package Manager), it is connecting.
     
  10. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    Hi I also have this problem, I post a thread but no one is replying, maybe you have an idea how to fix this.

    I have a game that automatically run a function (Auto Play the Game) after the Rewarded Video is sucessfuly finished as a part of Continue the game reward.

    It is working on the Editor, but not in the Android Build. On the Editor It auto play the Game, but on the Android it stock in the Main Menu. I still need to click the play button to continue the game.

    I suspect because of the Interstitial. Can I disable the interstitial of the Rewarded Video or is there another way?
     
  11. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    For your first problem, please, try to turn off Ads from Service Window and remove the Ads package from Package Manager. Anyway, It would be great to see the logs, it is hard to say something without the logs.

    About your second issue. Please, fill out a bug report via BugRepoter and provide me with a ticket number(post it here, or a private message). I can take a look.
     
  12. Leking006

    Leking006

    Joined:
    Sep 11, 2016
    Posts:
    35
    ok thanks.