On collision enter next scene
I am new to unity and need a simple script that I can copy/paste into a new script that enters the next scene when the player (Tagged "player") collides with a cube.
Comment
Answer by Vice_Versa · Sep 14, 2015 at 01:13 AM
void OnCollisionEnter(Collision myCollision)
{
if(myCollision.gameObject.tag == "Player")
{
Application.LoadLevel("Scene Name");
}
}
Answer by Dudicus · Jan 17, 2016 at 03:35 AM
I need to know if you attach it to the Player or something else.