Beruflich Dokumente
Kultur Dokumente
Video Tutorials 3
Ez Ads Window 4
Ez Ads Component 5
API and Code Examples 5
HeyZap Support 8
Advanced Options 8
API and Code Examples 9
Banner Ads 10
API and Code Examples 10
Interstitial Ads 12
API and Code Examples 12
Incentivized (Rewarded) Ads 14
API and Code Examples 14
Thank you for buying our asset and for supporting its further development. This plugin was created to extend the
functionality of Unity’s native system. Should you need help, find issues or have any suggestions, don’t hesitate to
send us a message at support@ezentertainment.eu
Please read the quick setup guide and check out our video tutorials before you start using this asset.
Solutions – Ez Ads solves the following problems
● A reliable ads solution should be easy to understand and quick to integrate. Ez Ads helps you integrate and
easily manage any of several ads platforms, by offering you an efficient all-in-one solution.
● By having an automated initialization and management of the active ads platform, you can load, show and
hide any type of ad simply by using either one line of code or UnityEvents (for a code free solution).
● All the callbacks supported by the ad platforms (eg. AdViewed, AdSkipped, etc...) are available to you out
of the box.
● Detailed video tutorials to help get you started.
● Currently supported Ads platforms are:
○ Unity Ads SDK v2.0+
○ HeyZap SDK v10+ for Unity
○ Amazon Mobile Ads 1.0+ SDK for Unity
Video Tutorials
Watch the introduction videos @YouTube:
Unity Ads:
How to Import Unity Ads into a Project - https://youtu.be/RAGpjKxYbCs
How to Use Unity Ads with Ez Ads - https://youtu.be/q_KYIzeUmdY
HeyZap:
How to Import HeyZap into Unity - https://youtu.be/o6xkeUF_6ZU
How to Use HeyZap with Ez Ads - https://youtu.be/am9G3X8PecU
using Ez.Ads;
If the auto initialization of Ez Ads is disabled, you will need to manually initialize the system by calling:
EzAds.Instance.Initialize();
using Ez.Ads;
To check if an ad is available:
//Example: EzAds.Instance.IsAdReady("rewardedVideo");
EzAds.Instance.ShowAd();
To show an ad with a specific placement ID:
EzAds.Instance.ShowAd(string placementId);
//Example: EzAds.Instance.ShowAd("video");
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddCallbackListener(EzAds.UnityAdsCallback.AdViewed, MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveCallbackListener(EzAds.UnityAdsCallback.AdViewed, MyListener);
HeyZap Support
This is the Ez Ads support script for HeyZap. From here you enter the configuration specific for this platform.
Remember that you must have the HeyZap SDK installed in your project before using Ez Ads.
Advanced Options
This section covers the initialization settings for
HeyZap:
● Show help - when enabled shows detailed
help in the inspector for all elements
● PublisherId - HeyZap Publisher ID. Can be
found at:
https://developers.heyzap.com/account
● Advanced Options - enables advanced
initialization options for HeyZap (if you don’t
need any of these, just set it to disabled):
○ Disable Automatic Fetching - Use this
flag to disable automatic prefetching
of ads. You must call a `Fetch` method
for every ad unit before a matching
call to a `Show` method.
○ Install Tracking Only - Use this flag to
disable all advertising functionality of
the Heyzap SDK. This should only be
used if you're integrating the SDK
solely as an install tracker.
○ Amazon Store - (Android only) Use this
flag to tell the Heyzap SDK that this
app is being distributed on the
Amazon App Store.
○ Disable Mediation - Use this flag to
disable the mediation features of the
Heyzap SDK. Only Heyzap ads will be
available.
○ Disable Automatic IAP Recording - (iOS
only) Use this flag to stop the Heyzap
SDK from automatically recording
in-app purchases.
○ Native Ads Only - (Android only) Use
this flag to disable all non-native ads &
ad networks that don't support native
ads.
○ Child Directed Ads - Use this flag to to
mark mediated ads as 'child-directed'.
This value will be passed on to
networks that support sending such an
option (for purposes of the Children's
Online Privacy Protection Act
(COPPA)).
API and Code Examples
To be able to use Ez Ads in your scripts, remember to add:
using Ez.Ads;
If the auto initialization of Ez Ads is disabled, you will need to manually initialize the system by calling:
EzAds.Instance.Initialize();
To launch the HeyZap Mediation Test Suite and verify that each mediated network you want to use has the
correct credentials and shows ads correctly:
EzAds.Instance.ShowHeyZapMediationTestSuite();
Banner Ads
This section covers the Banner Ad settings and
callbacks for HeyZap:
● Banner Ads - enables banner ads and shows
advanced options.
● Banner Ad Position - default position for
banner ads (can be Top or Bottom).
● AdMob Banner Size - specify the desired size
for AdMob banners (if used/needed).
● Facebook Banner Size - specify the desired size
for Facebook banners (if used/needed).
● Callbacks - enable callbacks for banner ads:
○ OnBannerAdLoaded - callback event
sent when a Banner Ad is loaded.
○ OnBannerAdError - Callback event
sent when a Banner Ad fails to load.
They can fail when refreshing after
successfully loading!
○ OnBannerAdClick - Callback event sent
when a Banner Ad is clicked. Pause the
game, if applicable.
EzAds.Instance.SetBannerAdPosition(BannerAdPosition adPosition);
//Example: EzAds.Instance.SetBannerAdPosition(EzAds.BannerAdPosition.Top);
EzAds.Instance.SetAdMobBannerSize(AdMobBannerSize bannerSize);
//Example: EzAds.Instance.SetAdMobBannerSize(EzAds.AdMobBannerSize.Banner);
EzAds.Instance.SetFacebookBannerSize(FacebookBannerSize bannerSize);
//Example: EzAds.Instance.SetFacebookBannerSize(EzAds.FacebookBannerSize.BannerRectangle_250);
EzAds.Instance.ShowBannerAd();
To change the display position for the banner ad and then show it:
EzAds.Instance.ShowBannerAd(BannerAdPosition bannerPosition);
//Example: EzAds.Instance.ShowBannerAd(EzAds.BannerAdPosition.Bottom);
To hide the currently shown banner (hidden banners can be shown again):
EzAds.Instance.HideBannerAd();
To destroy the current banner Ad, forcing a new one to be mediated and fetched:
EzAds.Instance.DestroyBannerAd();
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddBannerAdCallbackListener(EzAds.BannerAdCallback.BannerAdClick, MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveBannerAdCallbackListener(EzAds.BannerAdCallback.BannerAdClick, MyListener);
Interstitial Ads
This section covers the Interstitial Ad settings and
callbacks for HeyZap:
● Interstitial Ads - enables interstitial ads and
shows advanced options
● Callbacks - enable callbacks for interstitial ads:
○ OnInterstitialAdShow - callback event
sent when an Ad has been displayed.
This is a good place to pause your app,
if applicable.
○ OnInterstitialAdHide - callback event
sent when an Ad has been removed
from view. This is a good place to
unpause your app, if applicable.
○ OnInterstitialAdFailed - callback event
sent when 'show' is called but there is
no Ad to be shown.
○ OnInterstitialAdAvailable - Callback
event sent when an Ad has been
loaded and is ready to be displayed;
either because we auto-fetched an Ad
or because `Fetch` was called
manually.
○ OnInterstitialAdFetchFailed - callback
event sent when an Ad has failed to
load. Called both on auto-fetch and
manual “Fetch” attempts.
○ OnInterstitialAdAudioStarting -
callback event sent when an Ad is
about to be shown and will need
audio. Mute any background music.
○ OnInterstitialAdAudioFinished -
callback event sent when an Ad no
longer needs audio. Any background
music can be resumed.
EzAds.Instance.FetchInterstitialAd();
EzAds.Instance.ShowInterstitialAd();
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddInterstialAdCallbackListener(EzAds.InterstitialAdCallback.InterstitialAudioStarting
, MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveInterstialAdCallbackListener(EzAds.InterstitialAdCallback.InterstitialAudioStart
ing, MyListener);
Incentivized (Rewarded) Ads
This section covers the Incentivized Ad settings and
callbacks for HeyZap:
● Incentivized Ads - enables incentivized ads and
shows advanced options
● Callbacks - enable callbacks for incentivized
ads:
○ OnIncentivizedAdShow - callback
event sent when an Ad has been
displayed. This is a good place to
pause your app, if applicable.
○ OnIncentivizedAdHide - callback event
sent when an Ad has been removed
from view. This is a good place to
unpause your app, if applicable.
○ OnIncentivizedAdFailed - callback
event sent when 'show' is called but
there is no Ad to be shown.
○ OnIncentivizedAdAvailable - Callback
event sent when an Ad has been
loaded and is ready to be displayed;
either because we auto-fetched an Ad
or because `Fetch` was called
manually.
○ OnIncentivizedAdFetchFailed - callback
event sent when an Ad has failed to
load. Called both on auto-fetch and
manual “Fetch” attempts.
○ OnIncentivizedAdAudioStarting -
callback event sent when an Ad is
about to be shown and will need
audio. Mute any background music.
○ OnIncentivizedAdAudioFinished -
callback event sent when an Ad no
longer needs audio. Any background
music can be resumed.
○ OnIncentivizedAdResultComplete -
callback event sent when a
REWARDED Ad has been viewed
entirely. The user should be given a
reward.
○ OnIncentivizedAdResultIncomplete -
callback event sent when a
REWARDED Ad has been skipped. The
user should NOT be given a reward.
EzAds.Instance.FetchIncentivizedAd();
EzAds.Instance.ShowIncentivizedAd();
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddIncentivizedAdCallbackListener(EzAds.IncentivizedAdCallback.IncentivizedResultCompl
ete, MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveIncentivizedAdCallbackListener(EzAds.IncentivizedAdCallback.IncentivizedResultCo
mplete, MyListener);
Amazon Mobile Ads Support
This is the Ez Ads support script for HeyZap. From here you enter the configuration specific for this platform.
Remember that you must have the Amazon Mobile Ads SDK installed in your project before using
Ez Ads.
Advanced Options
This section covers the initialization settings for
Amazon Mobile Ads:
● Show help - when enabled shows detailed
help in the inspector for all elements
● Test Mode - enables test mode during
integration and testing of the Amazon Mobile
Ads API.
● Enable Logging - Enables writing log messages
during integration and testing of the Amazon
Mobile Ads API. Logging should not be
enabled in the production environment,
including when using Live App Testing. NOTE:
this setting affects the Amazon Mobile Asd
SDK! It is not related to Ez Ads debug
messages.
● Enable Geolocation - Enables the Amazon
Mobile Ads API to send the device's latitude
and longitude to the Amazon Mobile Ad
Network. Your app must include the correct
permissions to be able to utilize geolocation
data.
● Enable iOS support - checkmark enabling iOS
support
○ iOS App Key - Amazon Appstore
application key to identify your app
when an ad is loaded.
● Enable Android support - checkmark enabling
Android support
○ Android App Key - Amazon Appstore
application key to identify your app
when an ad is loaded.
(NOTE: The Application Keys can be found in
the Amazon Developer Console:
https://developer.amazon.com/ma/apps/mob
ile-ads-apps.html)
using Ez.Ads;
If the auto initialization of Ez Ads is disabled, you will need to manually initialize the system by calling:
EzAds.Instance.Initialize();
EzAds.Instance.ShowFloatingBannerAd();
EzAds.Instance.HideFloatingBannerAd();
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddBannerAdCallbackListener(EzAds.BannerAdCallback.BannerLoaded, MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveBannerAdCallbackListener(EzAds.BannerAdCallback.BannerLoaded, MyListener);
Interstitial Ads
This section covers the Interstitial Ad settings and
callbacks for Amazon Mobile Ads:
● Interstitial Ads - enables interstitial ads and
shows advanced options
● Disable Automatic Load - disable automatically
loading interstitial Ads. Manual load will be
required before showing.
● Callbacks - enable callbacks for interstitial ads:
○ OnInterstitialAdLoaded - callback
event sent each time an interstitial Ad
is successfully loaded.
○ OnInterstitialAdDismissed - callback
event sent immediately after an
interstitial Ad is dismissed.
○ OnInterstitialAdFailedToLoad -
callback event sent whenever the
retrieval of an interstitial Ad fails.
EzAds.Instance.LoadInterstitialAd();
EzAds.Instance.ShowInterstitialAd();
To attempt to show an interstitial ad and receive a bool response, depending on the result:
Generally, it is easier to add listeners to callbacks in the inspector window. However, if needed, callback listeners
can be added or removed through code, as well.
//Example:
//public void MyListener() {}
//EzAds.Instance.AddInterstitialAdCallbackListener(EzAds.InterstitialAdCallback.InterstitialLoaded,
MyListener);
//Example:
//public void MyListener() {}
//EzAds.Instance.RemoveInterstitialAdCallbackListener(EzAds.InterstitialAdCallback.InterstitialLoaded,
MyListener);