Documentation

Troubleshoot ad initialization and display

Solve common issues with ads that don't initialize, load, or show when you use LevelPlay components.
Read time 2 minutesLast updated 2 days ago

This page covers Console window messages and loading issues for LevelPlay components:

SDK fails to initialize without an app key

Symptoms

The Console window shows the following message:
cannot initialize without an App Key

Cause

The app key for the current platform is empty. In the Editor, the current platform is the active build target.

Resolution

To fix the issue, enter the app key for the current platform on the LevelPlay SDK component.

Ad unit ID is missing

Symptoms

The Console window shows the following message:
ad unit id is not set for this platform

Cause

The ad unit ID for the current platform is empty on that ad component.

Resolution

To fix the issue, enter the ad unit ID for the current platform on that ad component.

Ad fails to show before it loads

Symptoms

The Console window shows the following message:
not ready to show. Call LoadAd and wait for OnAdLoaded

Cause

ShowAd()
was called before an ad loaded.

Resolution

To fix the issue, use one of the following methods:

Ads fail to load

Symptoms

Ads don't load.

Cause

There are two possible causes:
  • Load On Start is disabled, and nothing calls
    LoadAd()
    .
  • On Init Failed is firing.

Resolution

To fix the issue, check the following:
  • Load On Start is enabled, or your game calls
    LoadAd()
    .
  • On Init Failed isn't invoked. If it is, find the cause: add a listener to the On Init Failed event of the LevelPlay SDK component, and log the
    ErrorCode
    and
    ErrorMessage
    properties of the
    LevelPlayInitError
    parameter.