3. Using the Heyzap Extension
-
General Requirements:
-
Stencyl 3.4 or above;
-
iOS Testing:
-
Mac OS X 10.9 (10.9 or higher recommended);
-
Xcode 8 (8.0 or higher recommended);
-
Android Testing:
-
Android device with Android 2.3.x or higher; NOTE: Android emulators are NOT recommended.
This extension contains the following blocks. You can find them in your Palette under
the “Extension” tab.
Fill in your Publisher ID in the Toolset Manager
You can find your Publisher ID under your Account at Heyzap.
Initialize Heyzap
Use this block to initialize your Heyzap. Use this block once per user
session (from the moment the user starts to play until the user quits the game). For example in a loading scene.
Fetch/Show Interstitial
Use this block to fetch or show the interstitial or Video from heyzap, use fetch before you can show an Ad.
- “Fetch”
- “Show”
Fetch/Show Video
Use this block to fetch or show the video ads from heyzap, use fetch before you can show an Ad.
- “Fetch”
- “Show”
Fetch/Show Rewarded Video
Use this block to fetch or show the Rewarded video ads from heyzap, use fetch before you can show an Ad.
- “Fetch”
- “Show”
Show/Hide Banner
Use this block to Show or Hide the Banner ads from heyzap, by default the banner will be at the bottom.
- “Show”
- “Hide”
Move Banner
Use this block to move the banner to Bottom of Top. (You only need to call this function once).
- “Bottom”
- “Top”
Callbacks Interstitial
Use this block in an “if statement”. Each condition becomes TRUE when a specific
event is happening. Before and after the event, the condition will always be
FALSE.
- “did successfully load”. It becomes TRUE when an Interstitial ad successfully loads.
- “did fail to load”. It becomes TRUE when an Interstitial ad fails to load.
- “is Closed”. It becomes TRUE when an Interstitial is closed (dismiss).
- “is Clicked”. It becomes TRUE when an Interstitial ad is Clicked.
- “is Showing”. It becomes TRUE when an Interstitial ad is Showing.
Callback Video
Use this block in an “if statement”. Each condition becomes TRUE when a specific
event is happening. Before and after the event, the condition will always be
FALSE.
- “did successfully load”. It becomes TRUE when an Interstitial ad successfully loads.
- “did fail to load”. It becomes TRUE when an Interstitial ad fails to load.
- “is Closed”. It becomes TRUE when an Interstitial is closed (dismiss).
- “is Clicked”. It becomes TRUE when an Interstitial ad is Clicked.
- “is Showing”. It becomes TRUE when an Interstitial ad is Showing.
Callbacks Rewarded Video
Use this block in an “if statement”. Each condition becomes TRUE when a specific
event is happening. Before and after the event, the condition will always be
FALSE.
- “did successfully load”. It becomes TRUE when an Interstitial ad successfully loads.
- “did fail to load”. It becomes TRUE when an Interstitial ad fails to load.
- “is Closed”. It becomes TRUE when an Interstitial is closed (dismiss).
- “is Clicked”. It becomes TRUE when an Interstitial ad is Clicked.
- “is Showing”. It becomes TRUE when an Interstitial ad is Showing.
- “has been fully watched” It becomes TRUE when an Rewarded Video ad is fully watched.
- “has not been fully watched” It becomes TRUE when an Rewarded Video ad is not fully watched.
Callback Banner
Use this block in an “if statement”. Each condition becomes TRUE when a specific
event is happening. Before and after the event, the condition will always be
FALSE.
- “did successfully load”. It becomes TRUE when an Interstitial ad successfully loads.
- “did fail to load”. It becomes TRUE when an Interstitial ad fails to load.
Test SDK (Debug only)
Use this block to test if SDK is of 3rd party is installed. (Put it under a button)
Remove this block when you publish your game.
Set Consent
If you want to set the consent programmatically you can use this block.
YES: Yes, i agree to personalized experience.
NO: No, I do not want personalized experience.
Go to https://www.fyber.com/gdpr-faqs/ for more information.
Get Consent
Return true(YES) if consent is set to YES and return false(NO) when consent is set to NO.
If you want to check if a user is in Europe, you can use the "User is in Continent: Europe" boolean block from https://byrobingames.github.io
Initialize Heyzap in your first scene (loading scene)
Fetch/Show Interstitial when a actor is pressed or you can place it when created Event of a scene.
Callbacks Interstitial in when updated event of the scene where the interstitial ad is shown