⚽NativeAdHolder
Last updated
Last updated
Native Ad Holders communicate with the PubScaleManager to send ad requests and receive ad fills. It is the packaging unit of a single native ad placement in your scene and handles how and when to make Ad requests.
AdResizeScale
Allows adjusting the ad scale to find the optimal fit inside the available space for the ad
adTag
This tag is used to identify an Ad placement in your game to track log events. Make sure they are unique.
canvas
Reference to the parent canvas component.
placeholder
This game object will be shown before the Ad loads and will get disabled once the ad is loaded.
adDisplay
Reference to the default component which will determine how the native ad is shown once it is loaded.
MORE FORMATS (Optional)
You can add more display variations. At runtime, the plugin selects the best variant based on the ad received.
landscapeAdFormats
List of NativeAdDisplayHandlers tailored for Ads with a Landscape product image.
portraitAdFormats
List of NativeAdDisplayHandler tailored for Ads with a Portrait product image.
nonMediaType
List of NativeAdDisplayHandler which handles cases when the advertisement does not have a product image.
UseExtraFormats
Boolean that tells the SDK to search the extra landscape and portrait formats at runtime when set to true. Otherwise, it will use only the default format assigned to adDisplay field.
AD FETCH OPTIONS
AutoFetch
If enabled, the Ad will automatically be requested in OnEnable for the Game Object
TriggerFetchWithCollider
If enabled, the Ad request will be made when a collider with a certain tag enters inside the bounds of the attached collider component. Make sure the IsTrigger is checked for the collider
TriggerOnCollisionWithTag
The game object Tag that will trigger the Ad request if TriggerFetchWithCollider is enabled
If both the above are deselected, the Ad Holder expects you to invoke FetchAd() manually from another script
RefreshRate
The Native Ad Holder makes a new ad request using this delay value after an impression is registered on the current ad displayed. The recommended value is 30s after an impression.
All these methods can be overloaded
FetchAd
Generates request for a new Ad.
HideAd
(⚠️ Native Ads can register click events even if they are overlapped by other UI components.) The AdDisplayHandler is disabled, and the placeholder object is activated. This prevents the ad from registering an unintentional click.
UnHideAd
Re-show the ad once the overlapping UI is not active
StopRefresh
Stops the Ad unit refresh calls.
ResetTriggerByColliderAdFetchCondition
Resets the condition to trigger a FetchAd call when using Collider as trigger
Event_AdRequest
The event is raised before the referenced NativeAdHolder component requests a new Ad from the ad cache.
Event_OnNativeAdActive
This static event is raised when any NativeAdHolder component gets activated in the scene.
Event_OnAdLoaded
The event is raised when the referenced NativeAdHolder component receives its Ad fill from the ad cache.
Event_OnAdFillNotReceivedInThisAttempt
The event is raised when there is no ad present in the cache at the time of the request by the NativeAdHolder
Event_OnAdImpression
The event is raised when the referenced NativeAdHolder component registers an impression for the loaded Ad.
Event_OnAdClicked
The event is raised when the referenced NativeAdHolder component registers a click for the active Ad.
Please make sure to subscribe to Event_AdRequest in the Awake() callback in order not to miss the Auto-Fetch Event_AdRequest, which is triggered in OnEnable()
Event_OnAdValuePaid
The event is raised when the impression-level revenue is available for the current impression.