Search Unity

Video Ads(Admob)won't show.They were showing since i first time implemented them , but suddently not

Discussion in 'Unity Ads & User Acquisition' started by Vasov97, Mar 10, 2017.

  1. Vasov97

    Vasov97

    Joined:
    Aug 4, 2016
    Posts:
    28
    The script is unchanged , I don't know why suddenly ads aren't showing.....



    using UnityEngine;
    using UnityEngine.SceneManagement;
    using UnityEngine.UI;

    public class BallScript : MonoBehaviour
    {

    public Vector2 startForce;

    static int times = 0;

    public Text goverText;

    public Vector3[] positions;

    public Rigidbody2D rb;

    void Start()
    {
    int randomNumber = Random.Range(0, positions.Length);
    transform.position = positions[randomNumber];
    times = PlayerPrefs.GetInt("Text:", times);
    rb.AddForce(startForce, ForceMode2D.Impulse);


    }

    void Update()
    {

    PlayerPrefs.SetInt("Text:", times);
    goverText.text = "Text:" + times.ToString();


    }

    void OnCollisionEnter2D(Collision2D other)
    {
    if (other.gameObject.name == "wall_bottom")
    {

    times++;

    if (times == 14)
    {
    AdsManager.Instance.ShowVideo();
    }

    if (times == 30)
    {
    AdsManager.Instance.ShowVideo();
    }

    if (times == 45)
    {
    AdsManager.Instance.ShowVideo();
    }

    SceneManager.LoadScene("wfvv");


    }

    }





    }
     
  2. elora_k

    elora_k

    Joined:
    Sep 20, 2016
    Posts:
    39
    Hi,

    Are you seeing any errors on the device from AdMob when trying to show an ad? Also, are you having issues with a specific placement or all of them?
     
  3. Vasov97

    Vasov97

    Joined:
    Aug 4, 2016
    Posts:
    28
    Noo, nothing
     
  4. elora_k

    elora_k

    Joined:
    Sep 20, 2016
    Posts:
    39
    If you pull a device log, are you seeing anything like "Can't instantiate adapter..." or "Error: No Fill"?

    On Android, you can install the adb command line tools to get the logcat file while running your app. And on iOS, you can see the device log through Xcode by going to Devices while running your app. I'm not sure which platform you're having issues with, but a device log should give you more information on what's happening.
     
  5. z3

    z3

    Joined:
    Jun 3, 2016
    Posts:
    34
    where are you resetting them back to zero after 45 and I mean saving the player prefs back to 0 mabey it went over I had to tell mine anything = or greater then 45 basically