Invoke Method not Working

void OnCollisionEnter(Collision collision)
{
switch (collision.gameObject.tag) {
case “Friendly”:
print(“ok”);
break;
case “Finish”:
state1 = state.trascending;
rocketSound.Stop();
rocketSound.PlayOneShot(Succes);
Invoke(“LoadNextScene”, 2.0f); //Loads the scene after 1 second
LoadNextScene();
break;
default:
state1 = state.dying;
Invoke(“Loading”, 2.0f);
rocketSound.Stop();
rocketSound.PlayOneShot(death);
Loading();
break;

    }

}

So, this is my code, the methods that invoke calls are well written and all the code compiles, but there is no delay when i use the code. Does anyone know why?

Privacy & Terms