Alright so I finally started scripting on my own and people keep telling me this is one of the easier questions, so I have a long road ahead of me. Anyway Im trying to switch scenes in unity 2d
void OnTriggerEnter2D (Collision2D Colider)
{
if(Colider.gameObject.tag == "Player")
Application.LoadLevel(level);
}
this script isn’t working because when I hit the object with my player I don’t switch scenes, I have the scene in my build, is Trigger is checked and it has a Rigidbody2D
What am I doing wrong?
How can I avoid this in the future?