- Home /
BCE0044 unexpected char: 0xFEFF
private var ray : Ray;
private var hit : RaycastHit;
function Start () {
}
function Update ()
{
if(Input.GetMouseButton(0))
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray, hit))
{
transform.position.x = hit.point.x;
} }
}
Answer by MarkFinn · Dec 22, 2012 at 03:16 PM
You have several bizarre non-ascii characters in your code. Make sure your file editor is set to use one of the standard unicode styles.
The first is somewhere in "private var hit" and the second is somewhere in "ScreenPointToRay(Input.mousePosition);"
Retype those in a simple text editor and you should be fine.
Make sure you're not trying to use a word processor or something to write code.
(The second is an invisible character between the "(" and the "I" in "Input.mousePosition".
Answer by camelion_ · Oct 02, 2013 at 11:31 AM
just clean your code with the help of the editor and it'll be fixed. the copy & past is the problem here, re-type your code and it'll be fine ;)
Your answer
Follow this Question
Related Questions
BCE0043 unexpected token! pls help. 1 Answer
BCE0043 unexpected token! pls help. 1 Answer
Error Building Player: 'aapt.exe' Win32Exception 3 Answers
not compiling for android 2 Answers
Invalid Characters in Path 1 Answer