- Home /
Why is my delay not working?
Hi guys,
So im trying to make a delay in my script. But if I make a delay with: yield return new WaitForSeconds (5); I get the error: The body of PlayerController.Update()
cannot be an iterator block because void
is not an iterator interface type.
Answer by Graham-Dunnett · Feb 19, 2014 at 12:48 PM
The Update function cannot use WaitForSeconds(). You can to call another function and have it do the wait. Update() gets called every update whether you want it to or not.
Answer by HariKrishnan · Feb 19, 2014 at 12:58 PM
you can use start co routine method to access the same methods
Your answer
Follow this Question
Related Questions
Yield And Return 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
WaitForSeconds/Yield problem 1 Answer
Vector3 Lerp, no smooth movement 1 Answer