-
Notifications
You must be signed in to change notification settings - Fork 7
UnityAdsHelper API
class / Inherits from: MonoBehaviour
public static bool isSupported { get; }
Gets a value indicating whether Unity Ads is supported in the current Unity player.
public static bool isInitialized { get; }
Gets a value indicating whether Unity Ads is initialized.
public static bool isShowing { get; }
Gets a value indicating whether an ad is currently showing.
public static string gamerSID { get; }
Gets the gamerSID, a unique identifier used with Server-to-Server Redeem Callbacks.
public static Action onFinished;
Action to be fired after closing an ad that was watched from beginning to end (not skipped).
public static Action onSkipped;
Action to be fired after closing an ad that was skipped before reaching the end.
public static Action onFailed;
Action to be fired when an error occurs while attempting to show an ad.
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.
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.
public static void SetGamerSID (string gamerSID);
Sets the gamer SID parameter, a unique identifier used with Server-to-Server Redeem Callbacks.
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.