- Home /
Unknown Identifier "target"
I'm following the unity 3d javascript tutorial. When I typed in the script to make the spotlight follow the character
var target : Transform;
function Update () { transform.LookAt(target); }
I get an error saying
target is an unknown identifier (Assets/Follow.js(3,26): BCE0005: Unknown identifier: 'target'.
Any ideas?
Please select your lines of text and make them look readable using the appropriate buttons.
Answer by heartofbruce · Aug 14, 2011 at 05:24 PM
The problem is a syntax error in the script. If you've mis-typed part of the script "Target" won't show up in the Inspector
Answer by Jessy · May 14, 2011 at 05:23 PM
You need to drag something onto the target slot in the Inspector.
Screenshot of it not being there requested. If it's not there, then your Unity installation is broken and a bug report is necessary.
Answer by steve363 · Apr 13, 2013 at 07:32 AM
I made the same mistake. I forgot to type "private var target: GameObject;" at the top of the javascript file.
Your answer
Follow this Question
Related Questions
Script won't run level (platformer tutorial) 1 Answer
I got a major question 1 Answer
BCE005: Unknown Identifier :'KDefaultraycastLayers' 1 Answer
BCE0005: Unknown identifier 1 Answer
Why Unknown identifier? 1 Answer