The Audience Network allows you to monetize your Android and iOS apps with Facebook ads. This guide explains how to add banner ads to your app.
Ensure you have completed the Audience Network Getting Started and Unity Getting Started guides before you proceed.
The first step toward displaying a banner ad is to create an AdView object in a C# script attached to a GameObject.
// Set delegates to get notified on changes or when the user interacts with the ad.
placementId - The Audience Network placement ID for this banner ad unit.
size - The size of the banner ad, specified by the AdSize enum values.
Once the AdView is instantiated, the next step is to load an ad. That's done with the loadAd() method in the AdView class.
public bool Show(AdPosition position) - Render the banner ad unit at predefined locations, available options are: AdPosition.TOP renders at the top of the screen, AdPosition.BOTTOM renders at the bottom of the screen.
public bool Show(double y) - Renders the banner ad unit at screen coordinates of (0, y).
public bool Show(double x, double y) - Renders the banner ad unit at screen coordinates of (x, y).
Audience Network supports three ad sizes to be used in your AdView. The Banner unit's width is flexible with a minimum of 320px, and only the height is defined.