Hi I’m setting a one-way teleport between scene but I keep getting bce0044 unexpected char 0x2028 do you guys know what I did wrong.
#pragma strict
function OnTriggerEnter(Collison: Collider)
{
if(Collision.gameObject.name == "Player")
{
Application.LoadedLevel ("snowland”);
}
}
Wow, that is a jacked up bug you have there.
In the Application.LoadedLevel method parameter you have TWO types of quotes around the “snowland” text. One is a normal double quote(the left side) and the other is a right double quote. Please only use normal(not right double) quotes for incasing strings.
I would also mention that you shouldn’t use the word “Collison” (you meant “Collision” and use it as such in the function) either use a different word(since Collision is a type in UnityEngine and it gets confused) or make the definition lower case:
Example:
#pragma strict
function OnTriggerEnter(collision: Collider)
{
if(collision.gameObject.name == "Player")
{
Application.LoadLevel ("snowland");
}
}