So I am trying to access an Animation in my script, wait for a moment, then have the other animation play. It seems to work fine, but I am it is saying I have unexpected symbols- "Unexpected symbol )" And then it has three other errors with that message. This is my code below- any help would be appreciated!
void OpenTheDoor (){
TheDoor.GetComponent<"Animator">().enabled=true;
yield return new WaitForSeconds(1);
TheDoor.GetComponent<"Animator">().enabled=false;
yield return new WaitForSeconds(5);
TheDoor.GetComponent<"Animator">().enabled=true;
yield return new WaitForSeconds(1);
TheDoor.GetComponent<"Animator">().enabled=false;
}
}
↧