I added this script to my character:
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if (hit.collider.name == "Exit_Flag")
{
Application.LoadLevel(Application.currentLevel + 1);
}
}
so when i hit a flag i made named Exit_Flag it would go to the next level because Statement was nice enough to make it for me.
When i try to test the game i get this error:
Assets/Change Level.js(5,43): BCE0019: 'currentLevel' is not a member of 'UnityEngine.Application'.
Anyone know a fix?