Hello, I checked over my code to make sure it matched the lecture, and VS tells me everything is okay, yet when I press play there is not delay after the finish line. Is there something wrong or could I have possibly missed a step? Here is my code:
āā"
using UnityEngine.SceneManagement;
public class FinishLine : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
Invoke("ReloadScene", .5f);
}
}
void ReloadScene()
{
SceneManager.LoadScene(0);
}
āā"