Exemple #1
0
    void OnAdStatusChanged()
    {
        AppendLog("AdState Changed to " + vrAd.adState);
        if (vrAd.IsReady())
        {
            // Enable Show Ad button once ad is ready
            ShowAdButton.interactable = true;
        }
        else if (vrAd.IsCompleted() || vrAd.IsFailed())
        {
            // Reload an ad for next session
            StartCoroutine(ReloadAd());

            // Disable Show Ad button while loading
            ShowAdButton.interactable = false;
        }
    }