Question by
$$anonymous$$ · Jan 06, 2020 at 07:31 AM ·
androidandroid buildads
[Help] Android Ads work only on computer
Hello,
This is my first question on this forum, so sorry if it's not the perfect place for this or something like that. I put a simple Android ads for try and it works when I try it on my computer, but when I build it and try on my Android, the ads don't appear. I have seen many people with the same problem on the Internet but no solution.
I start to think, it's because i need to use the Google Play for try ads on my game but not sure. My code seem to work, because in computer all are fine (except: i can skip or close only one ads, on the next i can't click on button, if you have an explanation on that too :) )
using UnityEngine;
using UnityEngine.Advertisements;
public class Advertisements : MonoBehaviour
{
string gameId = "XXXXXXX";
string myPlacementId = "video";
bool testMode = true;
public GameObject Player;
void Start()
{
Advertisement.Initialize(gameId, testMode);
justOneAds = true;
}
void Update()
{
if(Player.GetComponent<Player>().dead){
if(Advertisement.IsReady(myPlacementId)){
Advertisement.Show(myPlacementId);
}
}
}
}
}
Anyone has any advice ? thanks !
Comment