Exemplo n.º 1
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);
#endif
    }
Exemplo 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 || UNITY_WINRT_8_1 || UNITY_METRO
        VungleWin.setSoundEnabled(isEnabled);
#endif
    }
Exemplo n.º 3
0
    void OnGUI()
    {
        beginColumn();


        if (GUILayout.Button("Init"))
        {
            // replace with your app ID!!!
            VungleAndroid.init("com.prime31.Vungle");
        }


        if (GUILayout.Button("Is Sound Enabled?"))
        {
            Debug.Log("is sound enabled? " + VungleAndroid.isSoundEnabled());
        }


        if (GUILayout.Button("Set Sound Enabled"))
        {
            VungleAndroid.setSoundEnabled(true);
        }


        if (GUILayout.Button("Is Video Available?"))
        {
            Debug.Log("is video available? " + VungleAndroid.isVideoAvailable());
        }


        if (GUILayout.Button("Set Ad Orientation to AutoRotate"))
        {
            VungleAndroid.setAdOrientation(VungleAdOrientation.AutoRotate);
        }



        endColumn(true);

        if (GUILayout.Button("Play Ad"))
        {
            VungleAndroid.playAd();
        }


        if (GUILayout.Button("Play Insentivised Ad"))
        {
            VungleAndroid.playAd(true, "some-user");
        }

        endColumn();
    }
Exemplo n.º 4
0
    // Sets if sound should be enabled or not
    public static void setSoundEnabled(bool isEnabled)
    {
#if (!VUNGLE_AD_OFF)
#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
#endif
    }