So i have this code but i need it to play without a key hit and have it play play now and then
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Monetization;
public class AdController : MonoBehaviour
{
private string store_id = “123456”;
private string video_ad = “video”;
void Start()
{
Monetization.Initialize(store_id, true);
}
void Update()
{
if (Input.GetKeyDown(KeyCode.E))
{
if (Monetization.IsReady(video_ad))
{
ShowAdPlacementContent ad = null;
ad = Monetization.GetPlacementContent(video_ad) as ShowAdPlacementContent;
if (ad != null) { ad.Show(); }
}
}
}
}