private void CloseInterstitial()
        {
            // Resume game
            Time.timeScale = 1;

            InterstitialAd.SetActive(false);
            anim.Play("InterstitialOut");
        }
        private IEnumerator InterstitialDelayedCo()
        {
            while (!IsInterstitialLoaded && !InterstitialError)
            {
                yield return(null);
            }

            if (!InterstitialError)
            {
                Debug.Log("Showing custom interstitial.");
                InterstitialAd.SetActive(true);
                PlayInterstitialAnim();
            }
        }
 internal void ShowInterstitial()
 {
     if (IsInterstitialLoaded)
     {
         Debug.Log("Showing custom interstitial.");
         InterstitialAd.SetActive(true);
         PlayInterstitialAnim();
     }
     else
     {
         Debug.Log("Custom interstitial is not yet ready. It will be shown once it is ready.");
         StartCoroutine(InterstitialDelayedCo());
     }
 }