Table of Contents

WaitForElapsedLoops Method

Namespace
DG.Tweening

WaitForElapsedLoops(Tween, int, bool)

public static CustomYieldInstruction WaitForElapsedLoops(this Tween t, int elapsedLoops, bool returnCustomYieldInstruction)

Returns a CustomYieldInstruction that waits until the tween is killed or has gone through the given amount of loops. It can be used inside a coroutine as a yield.

Example usage:

yield return myTween.WaitForElapsedLoops(2);

Parameters

t Tween
elapsedLoops int

Elapsed loops to wait for

returnCustomYieldInstruction bool

Returns

CustomYieldInstruction