public void OnUnityAdsDidFinish(string placementId, ShowResult showResult) { if (showResult == ShowResult.Finished) { gameManager.ads.ResetAdInterval(); gameManager.gameLost = false; StartCoroutine(uiManager.CloseRewardedAdPanel()); countdownTimer.refresh(); countdownTimer.IsRewardedAdRound(); gameManager.resetPlayerLocation(); gameManager.ResetPlayedGames(); ball.gameObject.SetActive(true); ball.disableGravity(); ball.centreBallNoGravityToggle(); // Reward the user for watching the ad to completion. } else if (showResult == ShowResult.Skipped) { gameManager.lostGame(); StartCoroutine(uiManager.CloseRewardedAdPanel()); // Do not reward the user for skipping the ad. } else if (showResult == ShowResult.Failed) { Debug.LogWarning("The ad did not finish due to an error."); StartCoroutine(uiManager.CloseRewardedAdPanel()); } }