I have a script that declares this function:
static var targeter = null;
public function beginTarget(targtype:String,targrange:int,targAoE:int):void
{
if (targtype == "Projectile")
{
targeter = Instantiate(ProjectileTargeter,transform.position,transform.rotation);
}
}
For some reason, it comes up with this error:
(9,41): BCE0005: Unknown identifier: ‘ProjectileTargeter’.
I have a prefab ProjectileTargeter. Why is it coming up with that error? That’s exactly how previous examples in Unity Scripting documentation have presented Instantiate being used…
Thanks!
Thanks :) I'll remember to put the error code as a tag next time.
– SirMacJefferson