Sorry if this question is somewhat old...
You are correct, you need to include a reference to your animator component. All you need to do is add one line:
var myAnimator : Animator;
Then you attach the script to the desired object, and drag and drop your Animator Component onto the variable.
Hope this helps!
↧