Mediation 5.4.0 - Unity C# API Reference Mediation 5.4.0 - Unity C# API Reference
Mediation 5.4.0 - Unity C# API Reference Mediation 5.4.0 - Unity C# API Reference
© 2025 Chartboost, Inc. All rights reserved.

Class ChartboostMediation

The main interface to the Chartboost Mediation SDK.

Inheritance
object
ChartboostMediation
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Chartboost.Mediation
Assembly: Chartboost.Mediation.dll
Syntax
public sealed class ChartboostMediation

Fields

SDKVersion

The Chartboost Mediation SDK version. The value is a semantic versioning compliant string.

Declaration
public const string SDKVersion = "5.4.0"
Field Value
Type Description
string

Properties

AdaptersInfo

An array of all initialized adapters, or an empty array if the SDK is not initialized.

Declaration
public static AdapterInfo[] AdaptersInfo { get; }
Property Value
Type Description
AdapterInfo[]

CoreModuleId

Declaration
public static string CoreModuleId { get; }
Property Value
Type Description
string

DiscardOverSizedAds

bool value indicating that ads returned from adapters that are larger than the requested size should be discarded. An ad is defined as too large if either the width or the height of the resulting ad is larger than the requested ad size (unless the height of the requested ad size is 0, as is the case when using Adaptive, in this case,an error will be returned. This currently only applies to IBannerAd. Defaults to false.

Declaration
public static bool DiscardOverSizedAds { get; set; }
Property Value
Type Description
bool

LogLevel

Sets the log level. Anything of that log level and lower will be emitted. Set this to Chartboost.Logging.LogLevel.Disabled for no logs.

Declaration
public static LogLevel LogLevel { get; set; }
Property Value
Type Description
LogLevel

NativeSDKVersion

The native Chartboost Mediation SDK version. The value is a semantic versioning compliant string.

Declaration
public static string NativeSDKVersion { get; }
Property Value
Type Description
string

TestMode

A bool flag for setting test mode.

warning: Do not enable test mode in production builds.
Declaration
public static bool TestMode { get; set; }
Property Value
Type Description
bool

Methods

GetBannerAd()

Returns a new IBannerAd unit that can be used to load and display IBannerAd ads.

Declaration
public static IBannerAd GetBannerAd()
Returns
Type Description
IBannerAd

GetBannerVisualElement(string)

Returns a new BannerVisualElement VisualElement that can be used to load and display banner ads.

Declaration
public static BannerVisualElement GetBannerVisualElement(string placementName)
Parameters
Type Name Description
string placementName

The placement name for this IBannerAd ad.

Returns
Type Description
BannerVisualElement

GetFullscreenAdQueue(string)

Returns a IFullscreenAdQueue. Queue will not begin loading ads until Start() is called. Calling GetFullscreenAdQueue(string) more than once with the same placement ID returns the same object each time.

Declaration
public static IFullscreenAdQueue GetFullscreenAdQueue(string placementName)
Parameters
Type Name Description
string placementName

Identifier for the Chartboost placement this queue should load ads from.

Returns
Type Description
IFullscreenAdQueue

IFullscreenAd instance.

GetUnityBannerAd(string, Transform, BannerSize?)

Returns a new UnityBannerAd GameObject that can be used to load and display banner ads.

Declaration
public static UnityBannerAd GetUnityBannerAd(string placementName, Transform parent = null, BannerSize? size = null)
Parameters
Type Name Description
string placementName

The placement name for this IBannerAd ad.

Transform parent

The parent Transform under which this GameObject will be created.

BannerSize? size

size of the GameObject.

Returns
Type Description
UnityBannerAd

LoadFullscreenAd(FullscreenAdLoadRequest)

Loads a IFullscreenAd using the information provided in the request. Chartboost Mediation may return the same ad from a previous successful load if it was never shown nor invalidated before it got discarded.

A request containing the information used to load the ad. \param request .

\param completion A closure executed when the load operation is done.

Declaration
public static Task<FullscreenAdLoadResult> LoadFullscreenAd(FullscreenAdLoadRequest request)
Parameters
Type Name Description
FullscreenAdLoadRequest request
Returns
Type Description
Task<FullscreenAdLoadResult>

Task<TResult> with FullscreenAdLoadResult.

SetPreInitializationConfiguration(ChartboostMediationPreInitializationConfiguration)

Sets the Chartboost Mediation PreInitialization configuration. Setting this after initialization does nothing and returns an exception.

Declaration
public static ChartboostMediationError? SetPreInitializationConfiguration(ChartboostMediationPreInitializationConfiguration configuration)
Parameters
Type Name Description
ChartboostMediationPreInitializationConfiguration configuration
Returns
Type Description
ChartboostMediationError?

Events

DidReceiveImpressionLevelRevenueData

Event for receiving ILRD(Impression Level Revenue Data) events.

Declaration
public static event ChartboostMediationImpressionLevelRevenueDataEvent DidReceiveImpressionLevelRevenueData
Event Type
Type Description
ChartboostMediationImpressionLevelRevenueDataEvent

DidReceivePartnerAdapterInitializationData

Event for receiving partner initialization result events.

Declaration
public static event ChartboostMediationPartnerAdapterInitializationEvent DidReceivePartnerAdapterInitializationData
Event Type
Type Description
ChartboostMediationPartnerAdapterInitializationEvent