Hi. i’m a newbie to unity3d and javascript.
i want to make my character proceed to the next scene when it hits the castle_Collider. But my code for collision doesn’t work. I’ve already put my scenes in build settings.
here’s my script.
#pragma strict
function OnCollisionEnter (collision: Collision)
{
if(collision.gameObject.tag == “castle_Collider”)
{
Application.LoadLevel(“2”);
}
}
sorry for the poor english.