WaitForPosition Method
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
tTweenpositionfloatPosition (loops included, delays excluded) to wait for
returnCustomYieldInstructionbool
Returns
- CustomYieldInstruction