// 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 (!VUNGLE_AD_OFF) #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); VungleSceneLoom.Initialize(); #endif #endif }
// Initializes the Vungle SDK. Pass in your Android and iOS app ID's from the Vungle web portal. public static void init(string appId, string[] placements, 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, placements, PLUGIN_VERSION); #elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO VungleWin.init(appId, PLUGIN_VERSION, placements); VungleSceneLoom.Initialize(); #endif #endif }
// Starts up the SDK with the given appId private void Initialize(string appId) { VungleSDKConfig config = new VungleSDKConfig(); if (Vungle.minimumDiskSpaceForInitialization.HasValue) { config.SetMinimumDiskSpaceForInit(Vungle.minimumDiskSpaceForInitialization.Value); } if (Vungle.minimumDiskSpaceForAd.HasValue) { config.SetMinimumDiskSpaceForAd(Vungle.minimumDiskSpaceForAd.Value); } if (Vungle.enableHardwareIdPrivacy.HasValue) { config.SetDisableAshwidTracking(Vungle.enableHardwareIdPrivacy.Value); } config.SetPluginName("unity"); config.SetPluginVersion(Vungle.PluginVersion); config.SetApiEndpoint(new Uri(endpoint)); sdk = AdFactory.GetInstance(appId, config); sdk.AddOnEvent(VungleManager.OnEvent); VungleSceneLoom.Initialize(); }