Rick’s method to add the delay for loading the scene works without any issues, but I was wondering why my method isn’t working
My SceneLoader:
public IEnumerator LoadEndMenu()
{
Debug.Log("A");
yield return new WaitForSeconds(delayToEndMenu);
Debug.Log("B");
SceneManager.LoadScene(2);
}
my Player:
private void Die()
{
StartCoroutine(sceneLoader.LoadEndMenu());
Destroy(gameObject);
AudioSource.PlayClipAtPoint(playerDeathSFX, Camera.main.transform.position, playerDeathSFXVolume);
}
everything that’s before: yield return new WaitForSeconds(delayToEndMenu);
works, but the things after it don’t, what am I doing wrong?