using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; using TMPro; public class HowToPlayController : MonoBehaviour{ public TextMeshProUGUI countDown; // Countdown text private int count = 5; // Countdown timer // Start is called before the first frame update void Start(){ // Only have the How To Play Screen for 5 seconds StartCoroutine(LoadNextSceneDelay()); } IEnumerator LoadNextSceneDelay(){ // Print the countdown until game begins while (count > 0){ countDown.text = count.ToString(); // Convert to string count--; // Decrement yield return new WaitForSeconds(1f); // Wait a second } // Load the first level after the delay SceneManager.LoadScene("LevelOne"); } }