示例#1
0
        /// <summary>
        /// Publishers may choose to display a "Do Not Sell My Personal Information" link. Such publishers may choose to set a flag indicating whether a user located in California, USA has opted to not have their personal data sold.
        /// </summary>
        /// <param name="doNotSell"></param>
        public static void SetCCPA(bool doNotSell)
        {
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.SetDoNotSell(doNotSell);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.SetTagForUnderAgeOfConsent(doNotSell);
#endif
            }
        }
示例#2
0
        /// <summary>
        /// Initialize with app key.
        /// </summary>
        /// <param name="appKey">The app key obtained from MAS Developer Platform.</param>
        static void InitWithAppKey(string appKey)
        {
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.InitWithAppKey(appKey);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.InitWithAppKey(appKey);
#endif
            }
        }
示例#3
0
        /// <summary>
        /// MAS SDK requires that publishers set a flag indicating whether a user located in the European Economic Area (i.e., EEA/GDPR data subject) has provided opt-in consent for the collection and use of personal data. If the user has consented, please set the flag to true. If the user has not consented, please set the flag to false.
        /// </summary>
        /// <param name="consent"></param>
        public static void SetGDPR(bool consent)
        {
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.SetUserConsent(consent);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.SetUserConsent(consent);
#endif
            }
        }
示例#4
0
        /// <summary>
        /// Shows the reward video ad.
        /// </summary>
        /// <param name="placementId"></param>
        public static void ShowRewardedAd(string palcementId)
        {
            if (!initialized)
            {
                Debug.LogError("[Yodo1 Mas] The SDK has not been initialized yet. Please initialize the SDK first.");
                return;
            }
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.ShowRewardedAd(palcementId);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.ShowRewardedAd(palcementId);
#endif
            }
        }
示例#5
0
        public static void DismissBannerAd(bool destroy)
        {
            if (!initialized)
            {
                Debug.LogError("[Yodo1 Mas] The SDK has not been initialized yet. Please initialize the SDK first.");
                return;
            }
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.DismissBannerAd(destroy);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.DismissBannerAd(destroy);
#endif
            }
        }
示例#6
0
        /// <summary>
        /// Shows the banner ad.
        /// </summary>
        /// <param name="align">Align</param>
        /// <param name="offsetX">offsetX</param>
        /// <param name="offsetY">offsetY</param>
        public static void ShowBannerAd(int align, int offsetX, int offsetY)
        {
            if (!initialized)
            {
                Debug.LogError("[Yodo1 Mas] The SDK has not been initialized yet. Please initialize the SDK first.");
                return;
            }
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                Yodo1U3dAdsIOS.ShowBannerAd(align, offsetX, offsetY);
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                Yodo1U3dAdsAndroid.ShowBannerAd(align, offsetX, offsetY);
#endif
            }
        }
示例#7
0
        /// <summary>
        /// Whether the reward video ads have been loaded.
        /// </summary>
        /// <returns><c>true</c>, if the reward video ads have been loaded complete, <c>false</c> otherwise.</returns>
        public static bool IsRewardedAdLoaded()
        {
            if (!initialized)
            {
                Debug.LogError("[Yodo1 Mas] The SDK has not been initialized yet. Please initialize the SDK first.");
                return(false);
            }
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
#if UNITY_IPHONE
                return(Yodo1U3dAdsIOS.IsRewardedAdLoaded());
#endif
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
#if UNITY_ANDROID
                return(Yodo1U3dAdsAndroid.IsRewardedAdLoaded());
#endif
            }
            return(false);
        }