We need your help! We are testing unity ads and its working good on iphone and android phone. but it´s not showing anything on ipad. Is there a common mistake with ads on iPad?
our ads script looks like this:
public class ADSManagerScript : MonoBehaviour {
public bool Rewarded = true;
public GameObject SystemManager;
public GameObject SystemUI;
public GameObject PanelManager;
public RawImage PaletteImage_02;
private string gameID = “1745792”;
// Use this for initialization
void Start () {
//Get the right gameID for the right Store
if (Application.platform == RuntimePlatform.Android)
gameID = “1745792”;
if (Application.platform == RuntimePlatform.IPhonePlayer)
gameID = “1745793”;
Advertisement.Initialize(gameID, true);
StartCoroutine(StartADService());
}
IEnumerator StartADService()
{
// Wait until Unity Ads is initialized,
// and the default ad placement is ready.
while (!Advertisement.isInitialized || !Advertisement.IsReady())
{
yield return new WaitForSeconds(0.5f);
}
}
// Update is called once per frame
void Update () {
}
//Show our AD yo
public void ShowAD(bool rewarded)
{
Rewarded = rewarded;
//Unsere UI ausmachen
SystemUI.SetActive(false);
ShowOptions options = new ShowOptions();
options.resultCallback = HandleShowResult;
Advertisement.Show(“video”, options);
//Stop time during ad play
Time.timeScale = 0.0F;
//Turn Off other Sounds during ADPlay
var SystemManagement = SystemManager.GetComponent();
SystemManagement.TurnOffSound();
Debug.Log(“Plays AD!”);
}
//Check status of AD
void HandleShowResult(ShowResult result)
{
if (result == ShowResult.Finished)
{
Debug.Log(“Video completed - Offer a reward to the player”);
// Reward your player here.
if (Rewarded == true)
{
PaletteController.availablePositions = PaletteController.availablePositions + 1;
PaletteImage_02.uvRect = new Rect(0, 0.05F * PaletteController.availablePositions, 1, 0);
PaletteController.SaveColors();
var PanelManagement = PanelManager.GetComponent();
PanelManagement.ActivatePanel(4);
}
Time.timeScale = 1.0F;
//Unsere UI aanmachen
SystemUI.SetActive(true);
}
else if (result == ShowResult.Skipped)
{
Debug.LogWarning(“Video was skipped - Do NOT reward the player”);
Time.timeScale = 1.0F;
//Unsere UI aanmachen
SystemUI.SetActive(true);
}
else if (result == ShowResult.Failed)
{
Debug.LogError(“Video failed to show”);
Time.timeScale = 1.0F;
//Unsere UI aanmachen
SystemUI.SetActive(true);
}
//Turn Off other Sounds during ADPlay
var SystemManagement = SystemManager.GetComponent();
SystemManagement.TurnBackSound();
}
}