Loading an MREC
To load an MREC, call CreateMRec()
, passing in your Ad Unit ID and desired adview position:
-
const FString MRecAdUnitId = TEXT("ad_unit_ID"); void InitializeMRecAds() { // MRECs are sized to 300x250 on phones and tablets // You may use the utility method 'UAppLovinMAX::IsTablet()' to help with view sizing adjustments UAppLovinMAX::CreateMRec(MRecAdUnitId, EAdViewPosition::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
BottomRight
Showing an MREC
To show an MREC ad, call ShowMRec()
:
-
UAppLovinMAX::ShowMRec(MRecAdUnitId);
Hiding an MREC
To hide an MREC ad, call HideMRec()
:
-
UAppLovinMAX::HideMRec(MRecAdUnitId);