var X : float;
function Start () {
//Gathering normal object scale x
X = transform.localScale.x;
}
X = transform.localScale.x;
}
function Update () {
if(Input.GetKey(“a”)){ //Gamer pushes a key
//Set texture to normal position.
transform.localScale.x = X;
}else if(Input.GetKey(“d”)){ //Push d
//Flip the texture
transform.localScale.x = -X;
}
if(Input.GetKey(“a”)) {
transform.localScale.x = -X;
}else if(Input.GetKey(“d”)){transform.localScale.x = X;
}
}
So I have that. And I am getting this error:
Assets/Scripts/TextureFlip.js(6,20): BCE0044: unexpected char: 0x2028.
I have no idea what this means; I cant find those numbers anywhere. Please help me!