예제 #1
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 SetUserConsent(bool consent)
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
#if UNITY_IPHONE
            Yodo1U3dAdvertForIOS.SetUserConsent(consent);
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            Yodo1U3dAdvertForAndroid.SetUserConsent(consent);
#endif
        }
    }
예제 #2
0
    /// <summary>
    /// Sets the log enable.
    /// </summary>
    /// <param name="enable">If set to <c>true</c> enable.</param>
    public static void SetLogEnable(bool enable)
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
#if UNITY_IPHONE
            Yodo1U3dAdvertForIOS.SetLogEnable(enable);
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            Yodo1U3dAdvertForAndroid.SetLogEnable(enable);
#endif
        }
    }
예제 #3
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
            Yodo1U3dAdvertForIOS.InitWithAppKey(appKey);
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            Yodo1U3dAdvertForAndroid.InitWithAppKey(appKey);
#endif
        }
    }
예제 #4
0
    /// <summary>
    /// Shows the reward video ad.
    /// </summary>
    public static void ShowVideo()
    {
        if (!initialized)
        {
            Debug.LogError("[Yodo1 Ads] The SDK has not been initialized yet. Please initialize the SDK first.");
            return;
        }
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
#if UNITY_IPHONE
            Yodo1U3dAdvertForIOS.ShowVideo();
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            Yodo1U3dAdvertForAndroid.showVideo(Yodo1U3dSDK.Instance.SdkObjectName, Yodo1U3dSDK.Instance.SdkMethodName);
#endif
        }
    }
예제 #5
0
    /// <summary>
    /// Removes the banner ad.
    /// </summary>
    public static void RemoveBanner()
    {
        if (!initialized)
        {
            Debug.LogError("[Yodo1 Ads] The SDK has not been initialized yet. Please initialize the SDK first.");
            return;
        }
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
#if UNITY_IPHONE
            Yodo1U3dAdvertForIOS.RemoveBanner();
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            Yodo1U3dAdvertForAndroid.RemoveBanner();
#endif
        }
    }
예제 #6
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 VideoIsReady()
    {
        if (!initialized)
        {
            Debug.LogError("[Yodo1 Ads] The SDK has not been initialized yet. Please initialize the SDK first.");
            return(false);
        }
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
#if UNITY_IPHONE
            return(Yodo1U3dAdvertForIOS.VideoIsReady());
#endif
        }
        else if (Application.platform == RuntimePlatform.Android)
        {
#if UNITY_ANDROID
            return(Yodo1U3dAdvertForAndroid.videoIsReady());
#endif
        }
        return(false);
    }