Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

UnityAdsHelper Examples

Nikkolai Davenport edited this page Jun 10, 2016 · 3 revisions

Example Assets

Example assets are located in Assets/UnityAdsHelper/Examples:

  • UnityAdsExample.unity - Example scene file.
  • UnityAdsExample.cs - The main example script used to initialize UnityAdsHelper.
  • ButtonExample.cs - A Unity UI Button example script used to show rewarded ads.
    • Specify a zone ID or leave blank to use the default zone.
    • Set a cooldown time in seconds to control how often users can watch rewarded ads.
    • Set a reward amount the user should receive after watching an ad without skipping.
    • Cooldowns persist across scenes and game sessions.
    • Cooldowns are independent of each other.
  • ShowAdOnLoad.cs - Script for showing an ad when the scene loads.
    • Specify a zone ID or leave blank to use the default zone.
    • Set a timeout duration in seconds to allow for initialization.
    • Set a timeout duration in seconds to allow ads to become ready.
    • Set a yield time in seconds for how often isInitialized and IsReady() will be evaluated.
    • The process of showing and ad on load will be canceled if either timeout is exceeded.

These assets are reusable. Feel free to modify them for use in your own project.