I watched a tutorial online in which the person integrated unity ads and use the following code. He added a store_id
from platforms option in unity dashboard. I can't seem to find that.
I read about the issue and it say that when creating a project on unity dashboard I would have to provide app identifier so that store id is generated for it. So does it mean that I have to first upload without ads and then upload it again using ads?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Monetization;
using UnityEngine.SceneManagement;
using UnityEngine.Advertisements;
public class adController : MonoBehaviour
{
private string store_id = "";
private string video_ad = "video";
// Use this for initialization
void Awake ()
{
Monetization.Initialize(store_id, false);
}
// Update is called once per frame
void Update ()
{
if (Monetization.IsReady(video_ad))
{
ShowAdPlacementContent ad = null;
ad = Monetization.GetPlacementContent(video_ad) as ShowAdPlacementContent;
if (ad != null)
{
ad.Show();
}
}
}
}
If you have have some organized steps to achieve this please provide me the link. If I am unable to explain my issue do ask me.
Thanks