Table of Contents

WaitForPosition Method

Namespace
DG.Tweening

WaitForPosition(Tween, float, bool)

public static CustomYieldInstruction WaitForPosition(this Tween t, float position, bool returnCustomYieldInstruction)

Returns a CustomYieldInstruction that waits until the tween is killed or has reached the given time position (loops included, delays excluded). It can be used inside a coroutine as a yield.

Example usage:

yield return myTween.WaitForPosition(2.5f);

Parameters

t Tween
position float

Position (loops included, delays excluded) to wait for

returnCustomYieldInstruction bool

Returns

CustomYieldInstruction