LevelPlay component reference
View and edit the properties and events of the LevelPlay components to configure the LevelPlay SDK and banner, interstitial, and rewarded ads.
Read time 13 minutesLast updated a day ago
This page documents the Inspector window properties and events. You can add each component from its GameObject > Monetization menu item, or add it to an existing from Add Component > Monetization.
GameObjectFor how the components work together, refer to Introduction to LevelPlay components. For the components' public methods, refer to the LevelPlay component API reference.
LevelPlay components
The following table lists each component, its menu item, and its API reference:
Component | Menu item | API reference |
|---|---|---|
| LevelPlay SDK | GameObject > Monetization > LevelPlay SDK | |
| Banner Ad (LevelPlay) | GameObject > Monetization > Banner Ad (LevelPlay) | |
| Interstitial Ad (LevelPlay) | GameObject > Monetization > Interstitial Ad (LevelPlay) | |
| Rewarded Ad (LevelPlay) | GameObject > Monetization > Rewarded Ad (LevelPlay) | |
LevelPlay SDK component properties
The LevelPlay SDK component initializes the LevelPlay SDK. Add it once, in the first scene your game loads.
The LevelPlay SDK component contains the following properties:
Property | Description |
|---|---|
| Android App Key | Sets the app key used on Android, from the LevelPlay dashboard. The default is empty. |
| iOS App Key | Sets the app key used on iOS, from the LevelPlay dashboard. The default is empty. |
| User ID | Sets an optional user ID that the component passes to the SDK during initialization. Leave it empty if you don't need one. The default is empty. |
| Initialize On Start | Initializes the SDK automatically when the component starts. Disable it to call |
| Persist Across Scenes | Keeps the LevelPlay SDK |
| Pause Game During Ad | Pauses Unity while a full-screen ad is displayed. This property is supported only on iOS. On Android, this property has no effect, so pause your game in the ad's On Ad Displayed and On Ad Closed events instead. The default is disabled. |
| On Init Success | Defines the functions to call when the SDK initializes successfully. Passes |
| On Init Failed | Defines the functions to call when the SDK fails to initialize. Passes |
Banner Ad (LevelPlay) component properties
The Banner Ad (LevelPlay) component loads and displays a banner ad at a fixed position on the screen.
The Banner Ad (LevelPlay) component contains the following properties:
Property | Description |
|---|---|
| Android Ad Unit ID | Sets the banner ad unit ID used on Android. The default is empty. |
| iOS Ad Unit ID | Sets the banner ad unit ID used on iOS. The default is empty. |
| Load On Start | Loads the banner automatically after the SDK initializes. The default is enabled. |
| Display On Load | Shows the banner as soon as it loads. Disable it to call |
| Size | Sets the banner size. The options are Banner, Large, Medium Rectangle, Leaderboard, Adaptive, and Custom. The default is Banner. |
| Adaptive Width | Sets the width of the banner container. |
| Custom Width | Sets the banner width. The default is |
| Custom Height | Sets the banner height. The default is |
| Position | Sets the banner position: one of the nine screen anchors, which combine top, center, or bottom with left, center, or right, or Custom. The default is Bottom Center. |
| Custom Position | Sets the offset from the top-left corner of the screen. The default is |
| Placement Name | Sets an optional placement name used for reporting and targeting. The default is empty. |
| Respect Safe Area | Keeps the banner inside the device's safe area, away from notches and rounded corners. The default is disabled. |
| Bid Floor | Sets an optional price floor in USD. |
| On Ad Loaded | Defines the functions to call when the banner loads. Passes |
| On Ad Load Failed | Defines the functions to call when the banner fails to load. Passes |
| On Ad Displayed | Defines the functions to call when the banner becomes visible. Passes |
| On Ad Display Failed | Defines the functions to call when the banner fails to display. Passes |
| On Ad Clicked | Defines the functions to call when the player clicks the banner. Passes |
| On Ad Expanded | Defines the functions to call when the banner expands to cover the screen. Passes |
| On Ad Collapsed | Defines the functions to call when the banner returns from its expanded state. Passes |
| On Ad Left Application | Defines the functions to call when the app goes to the background after the player clicks the banner. Passes |
| On Ad Impression Data Ready | Defines the functions to call when impression-level revenue data is available for this banner. Passes |
Interstitial Ad (LevelPlay) component properties
The Interstitial Ad (LevelPlay) component loads and shows a full-screen interstitial ad, for example between levels.
The Interstitial Ad (LevelPlay) component contains the following properties:
Property | Description |
|---|---|
| Android Ad Unit ID | Sets the interstitial ad unit ID used on Android. The default is empty. |
| iOS Ad Unit ID | Sets the interstitial ad unit ID used on iOS. The default is empty. |
| Load On Start | Loads the ad automatically after the SDK initializes. The default is enabled. |
| Auto Reload | Loads a new ad automatically after the ad closes or fails to display. The default is enabled. |
| Placement Name | Sets an optional placement used by |
| Bid Floor | Sets an optional price floor in USD. |
| On Ad Loaded | Defines the functions to call when the ad loads and is ready to show. Passes |
| On Ad Load Failed | Defines the functions to call when the ad fails to load. Passes |
| On Ad Displayed | Defines the functions to call when the ad opens. Passes |
| On Ad Display Failed | Defines the functions to call when the ad fails to show. Passes |
| On Ad Clicked | Defines the functions to call when the player clicks the ad. Passes |
| On Ad Closed | Defines the functions to call when the player closes the ad. Passes |
| On Ad Info Changed | Defines the functions to call when the ad info of a loaded ad changes. Passes |
| On Ad Impression Data Ready | Defines the functions to call when impression-level revenue data is available. Passes |
Rewarded Ad (LevelPlay) component properties
The Rewarded Ad (LevelPlay) component loads and shows a full-screen rewarded ad that grants the player a reward when they finish watching it.
The Rewarded Ad (LevelPlay) component contains the same properties and events as the Interstitial Ad (LevelPlay) component, plus On Ad Rewarded. The following table lists all its properties:
Property | Description |
|---|---|
| Android Ad Unit ID | Sets the rewarded ad unit ID used on Android. The default is empty. |
| iOS Ad Unit ID | Sets the rewarded ad unit ID used on iOS. The default is empty. |
| Load On Start | Loads the ad automatically after the SDK initializes. The default is enabled. |
| Auto Reload | Loads a new ad automatically after the ad closes or fails to display. The default is enabled. |
| Placement Name | Sets an optional placement used by |
| Bid Floor | Sets an optional price floor in USD. |
| On Ad Loaded | Defines the functions to call when the ad loads and is ready to show. Passes |
| On Ad Load Failed | Defines the functions to call when the ad fails to load. Passes |
| On Ad Displayed | Defines the functions to call when the ad opens. Passes |
| On Ad Display Failed | Defines the functions to call when the ad fails to show. Passes |
| On Ad Clicked | Defines the functions to call when the player clicks the ad. Passes |
| On Ad Closed | Defines the functions to call when the player closes the ad. Passes |
| On Ad Info Changed | Defines the functions to call when the ad info of a loaded ad changes. Passes |
| On Ad Impression Data Ready | Defines the functions to call when impression-level revenue data is available. Passes |
| On Ad Rewarded | Defines the functions to call when the player earns the reward. Passes |