I am trying to change levels but it keeps saying “Identifier Expected”. When my player collides with a cube that has “is trigger” checked, I want to change the level to level2. But it doesn’t work. Can somebody please help me.
Ps. I have already attached the scenes in the build settings.Thanks.
using UnityEngine;
using System.Collections;
public class changeLevel : MonoBehaviour
{
function OnTriggerEnter (other : Collider)
{
Application.LoadLevel ("level2");
}
}