Class LevelPlayBannerAd
Implements ILevelPlayBannerAd to provide functionality for managing banner ads.
Inherited Members
Namespace: com.unity3d.mediation
Assembly: Unity.LevelPlay.dll
Syntax
public sealed class LevelPlayBannerAd : ILevelPlayBannerAd, IDisposable
Constructors
LevelPlayBannerAd(string, LevelPlayAdSize, LevelPlayBannerPosition, string, bool)
Initializes a new instance of the LevelPlayBannerAd with specified ad properties.
Declaration
public LevelPlayBannerAd(string adUnitId, LevelPlayAdSize size = null, LevelPlayBannerPosition position = LevelPlayBannerPosition.BottomCenter, string placementName = null, bool displayOnLoad = true)
Parameters
Type | Name | Description |
---|---|---|
string | adUnitId | The unique ID for the ad unit. |
Level |
size | Size of the banner ad. Defaults to BANNER if null. |
Level |
position | Position on the screen where the ad will be displayed.
Defaults to Bottom |
string | placementName | Optional name used for reporting and targeting. This parameter is optional and can be null. |
bool | displayOnLoad | Determines whether the ad should be displayed immediately after loading. Defaults to true. |
Methods
DestroyAd()
Destroys the banner ad and releases resources.
Declaration
public void DestroyAd()
Dispose()
Declaration
public void Dispose()
GetAdSize()
Retrieves the size of the ad.
Declaration
public LevelPlayAdSize GetAdSize()
Returns
Type | Description |
---|---|
Level |
GetAdUnitId()
Gets the ad unit ID associated with this ad.
Declaration
public string GetAdUnitId()
Returns
Type | Description |
---|---|
string |
GetPlacementName()
Retrieves the placement name associated with this ad.
Declaration
public string GetPlacementName()
Returns
Type | Description |
---|---|
string |
GetPosition()
Retrieves the position of the banner ad.
Declaration
public LevelPlayBannerPosition GetPosition()
Returns
Type | Description |
---|---|
Level |
HideAd()
Hides the banner ad from the user.
Declaration
public void HideAd()
LoadAd()
Loads the banner ad.
Declaration
public void LoadAd()
PauseAutoRefresh()
Pauses the auto-refreshing of the banner ad.
Declaration
public void PauseAutoRefresh()
ResumeAutoRefresh()
Resumes the auto-refreshing of the banner ad that was previously paused.
Declaration
public void ResumeAutoRefresh()
ShowAd()
Displays the banner ad to the user.
Declaration
public void ShowAd()
Events
OnAdClicked
Declaration
public event Action<LevelPlayAdInfo> OnAdClicked
Event Type
Type | Description |
---|---|
Action<Level |
OnAdCollapsed
Declaration
public event Action<LevelPlayAdInfo> OnAdCollapsed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdDisplayFailed
Declaration
public event Action<LevelPlayAdDisplayInfoError> OnAdDisplayFailed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdDisplayed
Declaration
public event Action<LevelPlayAdInfo> OnAdDisplayed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdExpanded
Declaration
public event Action<LevelPlayAdInfo> OnAdExpanded
Event Type
Type | Description |
---|---|
Action<Level |
OnAdLeftApplication
Declaration
public event Action<LevelPlayAdInfo> OnAdLeftApplication
Event Type
Type | Description |
---|---|
Action<Level |
OnAdLoadFailed
Declaration
public event Action<LevelPlayAdError> OnAdLoadFailed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdLoaded
Declaration
public event Action<LevelPlayAdInfo> OnAdLoaded
Event Type
Type | Description |
---|---|
Action<Level |