Question by
IshanCK · Jul 29, 2017 at 08:53 PM ·
collisionerrorscenescene-loadingerror build
Scene Editor Problem @username
This C# script won't work but it is sucessful. I was trying to get it so when the player touches the enemy that he goes to the main menu.
void OnTriggerEnter2D (Collider2D col)
{
if (col.tag == "Enemy")
{
Destroy (col.gameObject);
EditorSceneManager.LoadScene ("Main Menu");
}
}
Comment
Your answer
Follow this Question
Related Questions
How do you call a function once 2 Answers
Unknown error occurred while loading(Scene) 0 Answers
garbage collection in between scene changes? 2 Answers
Restarted scene not working properly 0 Answers