🍨Extra Display Templates
Last updated
Last updated
To use a single display template (for instance MediaLandscapeSimple), do the following in the NativeAdHolder component.
Assign MediaLandscapeSimple to the DEFAULT DISPLAY FORMAT field
Uncheck the ADD EXTRA DISPLAY FORMATS field
The Display Handler Templates used in the default Ad Prefabs are:
MediaLandscapeSimple
MediaLandscapeBlur
MediaPotrait
NonMedia
In addition to the above display handlers, the SDK provides the following additional templates:
LongHorizontalSimple
LongVerticalSimple
These can be found in the path:
Assets/PubscaleSDK/NativeAds/Prefabs/DisplayTemplates/Dynamic/
To use these formats:
Drag and drop the Display Template as a child to the SS_NativeAd or WS_NativeAd object
Follow the steps from the 'USING A SINGLE DISPLAY TEMPLATE' section
If you create your own Custom Display Template, make sure to create a variant for portrait big image media as well.
This will ensure the Ad unit looks good when the ad big image media is in Portrait aspect ratio.
In this case you have to add your custom display variants to the Display Options array as shown in the steps below
Set ADD EXTRA DISPLAY FORMATS field to Enabled
Remove any default display templates that you don't want to use from Display options array
Add your Custom display templates to the array for the SDK to pick at runtime depending on the Ad big media aspect ratio
Done!