Tweening.From<T, U>

Static Method in Tweening

Declaration

public static Tween From<T, U>(Interpolater<U> interpolater, T target, TweenGetter<T, U> getter, TweenSetter<T, U> setter, U endValue, float duration)

Description

Creates a tween that animates a parameter on an object from a given end value to the current value over a set duration.

Type Parameters

TThe type of object to tween.
UThe type of parameter to tween.

Parameters

interpolaterThe function that interpolates values between the start and end value.
targetThe object to tween.
getterThe function that gets the current value of the parameter.
setterThe function that sets a new value of the parameter.
endValueThe end value of the parameter.
durationThe duration of the tween.

Returns

TweenA new tween that animates the parameter.