Unity Ads Never Initialises in Editor

Hi all,

I just attempted to integrate Unity Ads into my game, and found it refreshingly simple reading over the docs. However, in practice it doesn’t seem to work for me.

I have imported the Unity Ads package, added a game to my account, grabbed the ID and run the Initialise code:

if (Advertisement.isSupported)
    Advertisement.Initialize ("65149", false);

You’ll note that i’ve tried forcing test mode to false here.

In an Update function, I am testing with the following:

    private void ShowAdOnPressSpace () {
        if (Input.GetKeyUp(KeyCode.Space)) {

            if (Advertisement.isInitialized)
                Debug.Log("Unity Ads Initialized succesfully");
            else
                Debug.Log("Unity Ads Not Initialized");

            if (Advertisement.IsReady())
                Advertisement.Show();
            else
                Debug.Log ("Advertisement not ready");
        }
    }

When I press space, the log says “Unity Ads Not Initialized” every time.

One thing to note is that I don’t have my App store ID yet, so in my account the game was created by simply specifying the name.

Searching google, I didn’t find anyone having similar issues.

Thanks

Mat

Hi Mat,

Have you changed target build (in Build Settings window) to be either iOS or Android?

/Rasmus

Hi Rasmus,

I haven’t I was just following the getting started guide and I don’t think it mentioned that. I’ll give that a try now.

I also just saw that a sticky on the forum is about also importing a helper package? Is this required? again, this wasn’t mentioned in the docs (not that I saw anyway).

Thanks

Mat

Hi Rasmus,

That worked a charm, thank you!

Does this mean however, that the web player is not supported? My app/game is ideal for multi-platform targeting and I was planning on releasing for desktops and web player as well as mobile.

Thanks again

Mat

Correct, as https://unityads.unity3d.com/help/Frequently%20Asked%20Questions/faq says, we currently support iOS and Android platforms.

/Rasmus