Answer the question
In order to leave comments, you need to log in
How to make ads in Unity (there is a code that, as I understand it, does not work)?
Hello! I tried to make an ad, but one stupidly does not show up ... Help please, are there any options?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class ads : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
if (Advertisement.isSupported)
{
Advertisement.Initialize("4714877", false);
}
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter(Collider other)
{
if (Advertisement.IsReady())
{
Advertisement.Show("video");
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question