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

UnityAdsHelper API

Nikkolai Davenport edited this page Jun 10, 2016 · 1 revision

UnityAdsHelper

class / Inherits from: MonoBehaviour

Static Properties

isSupported

public static bool isSupported { get; }

Gets a value indicating whether Unity Ads is supported in the current Unity player.

isInitialized

public static bool isInitialized { get; }

Gets a value indicating whether Unity Ads is initialized.

isShowing

public static bool isShowing { get; }

Gets a value indicating whether an ad is currently showing.

gamerSID

public static string gamerSID { get; }

Gets the gamerSID, a unique identifier used with Server-to-Server Redeem Callbacks.

onFinished

public static Action onFinished;

Action to be fired after closing an ad that was watched from beginning to end (not skipped).

onSkipped

public static Action onSkipped;

Action to be fired after closing an ad that was skipped before reaching the end.

onFailed

public static Action onFailed;

Action to be fired when an error occurs while attempting to show an ad.

Static Methods

Initialize

public static void Initialize ();

Configures and initializes Unity Ads using an instance of UnityAdsSettings. To configure Unity Ads settings, select Edit > Unity Ads Settings from the Unity Editor menu.

IsReady

public static bool IsReady ();
public static bool IsReady (string zoneId);

Determines if Unity Ads is initialized and ready to show an ad using the specified zoneId. If the zoneId is not specified, or is set to null, the default ad placement zone will be used instead.

SetGamerSID

public static void SetGamerSID (string gamerSID);

Sets the gamer SID parameter, a unique identifier used with Server-to-Server Redeem Callbacks.

ShowAd

public static void ShowAd ();
public static void ShowAd (string zoneId);

Shows an ad using the specified zoneId. If the zoneId is not specified, or is set to null, the default ad placement zone will be used instead.

Clone this wiki locally