Heya. My script was working fine until just out of the blue it decided that Input didn’t contain a definition for GetKeyDown, it happened across all my scripts that used Input.GetKeyDown. I also have the same problem with Input.GetKeyUp.
Here is one of the scripts:
Animator animator;
void Start () {
animator = transform.GetComponent <Animator> ();
}
void Update () {
if(Input.GetKeyDown(KeyCode.RightArrow)){
StopCoroutine ("Press");
StartCoroutine ("Press");
}
if (Input.GetKeyUp(KeyCode.RightArrow)) {
animator.SetBool("ArrDown", false);
}
}
void Press () {
animator.SetBool("ArrDown", true);
}
}
If anyone could help, that would be awesome Thanks!