Esempio n. 1
0
    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
    }
Esempio n. 2
0
    // 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
    }
Esempio n. 3
0
    // 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
    }
Esempio n. 4
0
    // 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
    }
Esempio n. 5
0
    // 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
    }
Esempio n. 6
0
    // 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
    }
Esempio n. 7
0
 // 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
 }
Esempio n. 8
0
    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
    }
Esempio n. 9
0
    // 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
    }
Esempio n. 10
0
    // 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
    }
Esempio n. 11
0
    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
    }
Esempio n. 12
0
    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
    }
Esempio n. 13
0
    // 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
    }
Esempio n. 14
0
    // 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
    }
Esempio n. 15
0
    // 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
    }
Esempio n. 16
0
    // 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
    }