- Home /
Admob Video ad won't show on android device
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");
}
}
}
Answer by marcosocram · Oct 08, 2017 at 05:46 AM
Use ad units ids real and check if they are still there in the inspector if you made them public. Also blank spaces in the ids would make the ads not to show. Those where some of the reason the ads where not showing in my project.
:) Hope it helps
Your answer
Follow this Question
Related Questions
Game crashes on player death 0 Answers
Ads shows in the editor but not in the Game? please help. 0 Answers
Showing Admob Banner Ad in scene? 1 Answer