public static void playAd(bool incentivized = false, string user = "", int orientation = 6) { #if UNITY_IPHONE VungleBinding.playAd(incentivized, user, (VungleAdOrientation)orientation); #elif UNITY_ANDROID VungleAndroid.playAd(incentivized, user); #elif UNITY_WSA_10_0 VungleWin.playAd(incentivized, user); #endif }
// Sets if sound should be enabled or not public static void setSoundEnabled(bool isEnabled) { #if UNITY_IPHONE VungleBinding.setSoundEnabled(isEnabled); #elif UNITY_ANDROID VungleAndroid.setSoundEnabled(isEnabled); #elif UNITY_WSA_10_0 VungleWin.setSoundEnabled(isEnabled); #endif }
// Initializes the Vungle SDK. Pass in your Android and iOS app ID's from the Vungle web portal. public static void init(string androidAppId, string iosAppId, string winAppId = "") { #if UNITY_IPHONE VungleBinding.startWithAppId(iosAppId, PLUGIN_VERSION); #elif UNITY_ANDROID VungleAndroid.init(androidAppId, PLUGIN_VERSION); #elif UNITY_WSA_10_0 VungleWin.init(winAppId, PLUGIN_VERSION); #endif }
// Checks to see if a video is available public static bool isAdvertAvailable() { #if UNITY_IPHONE return(VungleBinding.isAdAvailable()); #elif UNITY_ANDROID return(VungleAndroid.isVideoAvailable()); #elif UNITY_WSA_10_0 return(VungleWin.isVideoAvailable()); #else return(false); #endif }
// Sets if sound should be enabled or not public static void setSoundEnabled(bool isEnabled) { #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.setSoundEnabled(isEnabled); #elif UNITY_ANDROID VungleAndroid.setSoundEnabled(isEnabled); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.setSoundEnabled(isEnabled); #endif }
// Initializes the Vungle SDK. Pass in your Android and iOS app ID's from the Vungle web portal. public static void init(string androidAppId, string iosAppId, string winAppId = "") { #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.startWithAppId(iosAppId, PLUGIN_VERSION); #elif UNITY_ANDROID VungleAndroid.init(androidAppId, PLUGIN_VERSION); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.init(winAppId, PLUGIN_VERSION); #endif }
// Displays an ad with the given options. The user option is only supported for incentivized ads. public static void playAdWithOptions(Dictionary <string, object> options) { if (options == null) { throw new ArgumentException("You can not call this method with null parameter"); } #if UNITY_IPHONE VungleBinding.playAdEx(options); #elif UNITY_ANDROID VungleAndroid.playAdEx(options); #elif UNITY_WSA_10_0 VungleWin.playAdEx(options); #endif }
public static void updateConsentStatus(Vungle.Consent consent, string version = "1.0") { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.updateConsentStatus(consent, version); #elif UNITY_ANDROID VungleAndroid.updateConsentStatus(consent, version); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.updateConsentStatus(consent, version); #endif #endif }
// Displays an ad with the no options. The user option is only supported for incentivized ads. public static void playAd(string placementID) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.playAd(placementID); #elif UNITY_ANDROID VungleAndroid.playAd(placementID); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.playAd(placementID); #endif #endif }
// Displays an ad with the given options. The user option is only supported for incentivized ads. public static void playAd(bool incentivized = false, string user = "", int orientation = 6) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.playAd(incentivized, user, (VungleAdOrientation)orientation); #elif UNITY_ANDROID VungleAndroid.playAd(incentivized, user); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.playAd(incentivized, user); #endif #endif }
public static Vungle.Consent getConsentStatus() { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return(Consent.Undefined); #endif #if UNITY_IPHONE return(VungleBinding.getConsentStatus()); #elif UNITY_ANDROID return(VungleAndroid.getConsentStatus()); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO return(VungleWin.getConsentStatus()); #endif #endif }
public static void init(string appId, bool initHeaderBiddingDelegate) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif #if UNITY_IPHONE VungleBinding.startWithAppId(appId, PLUGIN_VERSION, initHeaderBiddingDelegate); #elif UNITY_ANDROID VungleAndroid.init(appId, PLUGIN_VERSION); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.init(appId, PLUGIN_VERSION); VungleSceneLoom.Initialize(); #endif #endif }
// Close flex ads. public static bool closeAd(string placementID) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return(false); #endif #if UNITY_IPHONE return(VungleBinding.closeAd(placementID)); #elif UNITY_ANDROID return(VungleAndroid.closeAd(placementID)); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.closeAd(placementID); return(true); #endif #endif }
// Displays an ad with the given options. The user option is only supported for incentivized ads. public static void playAd(Dictionary <string, object> options, string placementID) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif if (options == null) { options = new Dictionary <string, object>(); } #if UNITY_IPHONE VungleBinding.playAd(options, placementID); #elif UNITY_ANDROID VungleAndroid.playAd(options, placementID); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.playAd(options, placementID); #endif #endif }
// Checks to see if a video is available public static bool isAdvertAvailable(string placementID) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return(false); #endif #if UNITY_IPHONE return(VungleBinding.isAdAvailable(placementID)); #elif UNITY_ANDROID return(VungleAndroid.isVideoAvailable(placementID)); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO return(VungleWin.isVideoAvailable(placementID)); #else return(false); #endif #else return(false); #endif }
// Displays an ad with the given options. The user option is only supported for incentivized ads. public static void playAdWithOptions(Dictionary <string, object> options) { #if (!VUNGLE_AD_OFF) #if UNITY_EDITOR return; #endif if (options == null) { throw new ArgumentException("You can not call this method with null parameter"); } #if UNITY_IPHONE VungleBinding.playAdEx(options); #elif UNITY_ANDROID VungleAndroid.playAdEx(options); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.playAdEx(options); #endif #endif }