Hi everybody,
I want to play an animation continiously, but every time with delay between them. I know that corountines are not enabled in the Update-function because of certain performancing issues. However, my code do not work correctly ass it should:
public var delay : int = 15;
function Update () {
Platform();
}
function Platform() {
GetComponent(Animation).Play("Platform");
yield new WaitForSeconds(delay);
}
The problem here is that it does not wait the WaitForSeconds-command, so the animation is looping straight after its end without any delay between it.
Any suggestions? Thanks in advance.