Hi all,
So I’ve been wondering why this piece of code won’t work:
private void Die()
{
StartCoroutine(FindObjectOfType<Level>().LoadGameOver());
}
Where in Level it looks like this:
public IEnumerator LoadGameOver()
{
yield return new WaitForSeconds(2);
SceneManager.LoadScene("Game Over");
}
Thanks in advance,
Marcell