So, I'm making a script for my animation controller to transition from idle to shooting but it's giving me that error and I am not sure why.
using UnityEngine;
using System.Collections;
public class CZ805Controller : MonoBehaviour {
private Animator anim;
// Use this for initialization
void Start ()
{
anim = GetComponet ();
}
// Update is called once per frame
void Update ()
{
if (Input.GetButton ("Fire1"))
{
anim.SetBool ("Shoot", true);
}
else
{
anim.SetBool ("Shoot", false);
}
}
}
↧