AppLovinMax_Unity_MRECs - imobile/app-mediation GitHub Wiki
MRECs
Loading an MREC
To load an MREC, call CreateMRec()
, passing in your ad unit ID and desired adview position:
string mrecAdUnitId = "YOUR_MREC_AD_UNIT_ID"; // Retrieve the id from your account
public void InitializeMRecAds()
{
// MRECs are sized to 300x250 on phones and tablets
MaxSdk.CreateMRec(mrecAdUnitId, MaxSdkBase.AdViewPosition.Centered);
}
The above example creates an MREC centered on the display ( Centered
). The complete list of position options are TopLeft
, TopCenter
, TopRight
, Centered
, CenterLeft
, CenterRight
, BottomLeft
, BottomCenter
, and BottomRight
.
Hiding and Showing an MREC
To show an MREC ad, call ShowMRec()
:
MaxSdk.ShowMRec(mrecAdUnitId);
To hide an MREC ad, call HideMRec()
:
MaxSdk.HideMRec(mrecAdUnitId);