Hi, i’m having trouble getting the scripting tutorial to work:
http://docwiki.unity3d.com/uploads/Main/Scripting%20Tutorial.pdf
It’s fine down to 6.accessing components where I enter the script:
var switchToTarget : Transform;
function Update () {
if (Input.GetButtonDown(“Jump”))
GetComponent(Follow).target = switchToTarget;
}
and add this to the spotlight but the switchToTarget parameter doesn’t then show up in inspector view so I can’t drag my cube onto it to select it as target.
If I try to use a tag instead I get the error: Unknown identifier: ‘Follow’.
Can someone please tell me what I am doing wrong?