Tweening.To<T>

Static Method in Tweening

Declaration

public static Tween To<T>(T target, TweenGetter<T, float> getter, TweenSetter<T, float> setter, float endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, double> getter, TweenSetter<T, double> setter, double endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, int> getter, TweenSetter<T, int> setter, int endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, long> getter, TweenSetter<T, long> setter, long endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, short> getter, TweenSetter<T, short> setter, short endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Vector2> getter, TweenSetter<T, Vector2> setter, Vector2 endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Vector2Int> getter, TweenSetter<T, Vector2Int> setter, Vector2Int endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Vector3> getter, TweenSetter<T, Vector3> setter, Vector3 endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Vector3Int> getter, TweenSetter<T, Vector3Int> setter, Vector3Int endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Vector4> getter, TweenSetter<T, Vector4> setter, Vector4 endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Quaternion> getter, TweenSetter<T, Quaternion> setter, Quaternion endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Rect> getter, TweenSetter<T, Rect> setter, Rect endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.

Overload

Declaration

public static Tween To<T>(T target, TweenGetter<T, Color> getter, TweenSetter<T, Color> setter, Color endValue, float duration)

Description

Creates a tween that animates a parameter to a given end value over a set duration.

Type Parameters

TThe type of object to tween.

Parameters

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.