0

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

thirteen4054
  • 465
  • 4
  • 17
  • 1
    You do not upload your game/app to the market. You just need to create your product page on the store. And actually what you really need is just GAME_ID. So you do not need store_id to show ads. https://unity3d.com/services/ads/quick-start-guide http://unityads.unity3d.com/help/unity/legacy-integration-unity#using-the-services-window – temre May 02 '19 at 08:58
  • yes that is what I meant I cant find `game_id` – thirteen4054 May 02 '19 at 09:06
  • oh ok I found it. Its now in settings>project settings. Thanks mate. – thirteen4054 May 02 '19 at 09:09

0 Answers0