Playmaker Support

Now the plugin contains playmaker actions.

The actions' scripts can be found in the zip archive at:

Assets/Extensions/GoogleMobileAd/Addons/PlayMakerActions

You can simply unzip it to the same folder and Google Mobile Ad actions will appear under playmaker actions menu. You are always welcomed on the PlayMaker Actions Forum Thread to request new actions or report a bug.

The current action list is:

GAD_InitGoogleAd

Use this action to init Google Ad.

GAD_BannerEvents

Use this action to subscribe on banner events.

Fileds:

  • Banner Id [Int32] - id of banner which you want to use.

Events:

  • On Loaded Event - fires when successfully loads event.
  • On Failed To Load Event - fires when fail to loads event.
  • On Open Event - fires when opens banner.
  • On Close Event - fires when closes banner.
  • On Left Application Event - fires when leaves application.

GAD_InterstitialEvents

Use this action to subscribe on interstitial events. 

Events:

  • On Loaded Event - fires when successfully loads interstitial.
  • On Failed To Load Event - fires when fails loaded interstitial.
  • On Open Event -  fires when opens interstitial.
  • On Close Event -  fires when closes interstitial.
  • On Left Application Event -  fires when leaves application.

GAD_SetAdTargeting

Use this action to set ad targeting.

Fileds:

  • Keywords [string] - keywords for ad targeting and after fill this with keywords.
  • Day [Int32] - the day was born group of target ad.
  • Year [Int32] - a year was born group of target ad.

Checklist:

  • Gender - the gender of targeting ad.
  • Month - month was born group of target ad.

Checkbox:

  • Tag For Child Directed Trea - you can enable tag for the child.
  • Set Birthday - you can enable target ad based on date of birth.

GAD_SetAdTestDevices

Use this action to set test devices for google ad.

Fileds:

  • Devices Ids [string] - count of the test device, and after fill it with an id of test devices. 

GAD_CreateBanner

Use this action to create a banner.

Fileds:

  • Banner id [Int32] - id of the banner.
  • XCoord [Int32] - x coordinate of banner.
  • YCoord [Int32] - y coordinate of banner.

Events:

  • Success Event - fires when successfully creates a banner.
  • Fail Event - fires when fails to create a banner.

Checklist:

  • Size - size and type of the banner.
  • Anchor - position of a banner.

Checkbox:

  • Create With Coord - shows a banner on load or not.
  • Show Banner On Load - creates banner with coord in fields.

GAD_ShowBanner

Use this action to show banner.

Fileds:

  • Banner Id [Int32] - id of a banner which you need to show.

GAD_HideBanner

Use this action to hide banner.

Fileds:

  • Banner Id [Int32] - id of the banner which you need to hide.

GAD_RefreshBanner

Use this action to refresh banner.

Fileds:

  • Banner Id [Int32] - id of the banner which you need to refresh.

GAD_DestroyBanner

Use this action to destroy banner by id.

Fileds:

  • Banner Id [Int32] - id of the banner which you need to destroy.

GAD_StartInterstisialAd

Use this action to start interstitial.

Events:

  • Success Event - fires when starts interstitial.
  • Fail Event - fires when fails to start interstitial.

GAD_LoadInterstisialAd

Use this action to load interstitial. 

Events:

  • Success Event - fires when loads interstitial.
  • Fail Event -  fires when fails to load interstitial.

GAD_ShowInterstisialAd

Use this action to show interstitial. 

Events:

  • Success Event - fires when shows interstitial.
  • Fail Event -  fires when fails to show interstitial.

Implementation Guide

Make sure you read the Setup and Getting Started sections first.

With iAd you can use two types of an ad interstitial and banners. But first of all, you need to init google ad use the GAD_InitGoogleAd action.

1. Interstitial

There are two ways to use interstitial.

  • GAD_StartInterstisialAd action. Will start Ad load request and when the ad loads, it will show the interstitial ad.
  • Use GAD_LoadInterstisialAd to load the Ad content. SuccessEvent will be fired if content was loaded successfully, otherwise failEvent will be fired. After the content is loaded successfully, you may use GAD_ShowInterstisialAd action to show the ad.

You should use one of those approaches every time you want to show the interstitial ad.

2. Banners

1) Create ad banner using GAD_CreateBanner action. If the banner is successfully created, SuccessEvent will be fired, otherwise  FailEvent will bbe fired if creation failed.

Do not fill the bannerId section. It will be filled after the banner is created. Store this id. It will be used to control creation of the banner with the following playmaker actions 

  • GAD_HideBanner - will hide the banner
  • GAD_ShowBanner - will show the banner
  • GAD_RefreshBanner - will refresh the banner
  • GAD_DestroyBanner - will destroy the banner