I made a circle wipe for my game using a tutorial made by brackeys and now when I go to click any of the buttons they don’t work like the play button doesn’t load the next scene. does anyone have a way of fixing this. here’s my code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LevelLoader : MonoBehaviour
{
public Animator transition;
public float transitionTime = 1f;
// Start is called before the first frame update
public void levelLoader()
{
LoadNextLevel();
}
// Update is called once per frame
public void LoadNextLevel()
{
StartCoroutine(LoadLevel(SceneManager.GetActiveScene().buildIndex + 1));
}
IEnumerator LoadLevel(int levelIndex)
{
//Play animation
transition.SetTrigger("Start");
yield return new WaitForSeconds(transitionTime);
//Load scene
SceneManager.LoadScene(levelIndex);
}
}