Возникла проблема при попытке воспроизвести рекламу. В консоли появляется только журнал ошибок: Please consider upgrading to the Packman Distribution of the Unity Ads SDK. The Asset Store distribution will not longer be supported after Unity 2018.3 UnityEngine.Advertisements.Advertisement:Initialize (string,bool) Unity ADS Скачать из PackageManager. Вот мой код:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class Lose_Menu : MonoBehaviour
{
public GameObject LoseMenu;
void Start()
{
if(Advertisement.isSupported)
{
Debug.Log("Work");
Advertisement.Initialize("4019043", false);
}
}
public void OnTriggerEnter(Collider other){
if(other.tag == "Obstacle"){
LoseMenu.SetActive(true);
Time.timeScale = 0f;
if(Advertisement.IsReady())
{
Debug.Log("Good");
Advertisement.Show("video");
}
}
if(other.tag == "Platform"){
LoseMenu.SetActive(true);
Time.timeScale = 0f;
if(Advertisement.IsReady())
{
Advertisement.Show("video");
}
}
}
}