void OnAdStatusChanged(object sender, AdStatusChangedEventArgs e) { AppendLog("AdState Changed to " + e.Status.ToString()); if (vrAd.IsLoaded()) { // Enable Show Ad button once ad is ready ShowAdButton.interactable = true; } else if (vrAd.IsCompleted()) { // Reload an ad for next session vrAd.LoadAd(); // Disable Show Ad button while loading ShowAdButton.interactable = false; } }
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; } }