'How to set delay OnStepcomplete with dotween Unity?

I want to set a delay after every dotween loop. Onstepcomplete method doesn't seem to work with Ienumorator and SetDelay method delay at the start of the Tween. How do I it?

 void Movement()
{
    transform.DOPath(path, moveduration, pathType, pathMode, 10).SetLoops(-1, LoopType.Yoyo).SetEase(ease).SetDelay(startdelay)
        .OnStepComplete(StartCoroutine(Wait()));
}

private IEnumerator Wait()
{
    yield return new WaitForSeconds(delay);
}


Solution 1:[1]

You need to put your tween in a sequence to do what you want.

DOTween.Sequence().SetDelay(1f).Append(transform.DOPath(XXX).OnComplete(XXX)).AppendInterval(1f).SetLoops(-1, LoopType.Yoyo).Play();

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1