using UnityEngine;
using System.Collections;
public class WeaponAnimControl : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Animator anim = GetComponent();
Animation anima = GetComponent();
int RightClick = Animator.StringToHash (“RightClick”);
if(Input.GetKey (KeyCode.Mouse2)){
anim.SetBool(RightClick, true);
anima.Play (“aimdownsights”);
Debug.Log (“Aiming Down Sights”);
}
else{
anim.SetBool(RightClick, false);
anima.Play (“idle”);
Debug.Log (“Idle-ing”);
}
}
}
When I right click, neither the Bool or the animation play. In addition, the console doesn’t print anything out.
What am I doing wrong?