Interface ITransitionAnimations
Provides helper methods to create transition animations for VisualElement style values
Namespace: UnityEngine.UIElements.Experimental
Syntax
public interface ITransitionAnimations
Methods
Layout(Rect, Int32)
Triggers an animation changing this element's layout style values.
Declaration
ValueAnimation<Rect> Layout(Rect to, int durationMs)
Parameters
Type | Name | Description |
---|---|---|
Rect | to | |
Int32 | durationMs |
Returns
Type | Description |
---|---|
ValueAnimation<Rect> |
See Also
Position(Vector3, Int32)
Triggers an animation changing this element's transform position.
Declaration
ValueAnimation<Vector3> Position(Vector3 to, int duration)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | to | |
Int32 | duration |
Returns
Type | Description |
---|---|
ValueAnimation<Vector3> |
See Also
Rotation(Quaternion, Int32)
Triggers an animation changing this element's transform rotation.
Declaration
ValueAnimation<Quaternion> Rotation(Quaternion to, int duration)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | to | |
Int32 | duration |
Returns
Type | Description |
---|---|
ValueAnimation<Quaternion> |
See Also
Scale(Single, Int32)
Triggers an animation changing this element's transform scale.
Declaration
ValueAnimation<float> Scale(float to, int duration)
Parameters
Type | Name | Description |
---|---|---|
Single | to | |
Int32 | duration |
Returns
Type | Description |
---|---|
ValueAnimation<Single> |
See Also
Size(Vector2, Int32)
Triggers an animation changing this element's size style values.
Declaration
ValueAnimation<Vector2> Size(Vector2 to, int durationMs)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | to | |
Int32 | durationMs |
Returns
Type | Description |
---|---|
ValueAnimation<Vector2> |
See Also
Start(Color, Color, Int32, Action<VisualElement, Color>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Color> Start(Color from, Color to, int durationMs, Action<VisualElement, Color> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Color | from | Start value. |
Color | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Color> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Color> | The created animation object. |
Start(Func<VisualElement, Color>, Color, Int32, Action<VisualElement, Color>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Color> Start(Func<VisualElement, Color> fromValueGetter, Color to, int durationMs, Action<VisualElement, Color> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Color> | fromValueGetter | Callback that provides the initial value. |
Color | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Color> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Color> | The created animation object. |
Start(Func<VisualElement, Quaternion>, Quaternion, Int32, Action<VisualElement, Quaternion>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Quaternion> Start(Func<VisualElement, Quaternion> fromValueGetter, Quaternion to, int durationMs, Action<VisualElement, Quaternion> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Quaternion> | fromValueGetter | Callback that provides the initial value. |
Quaternion | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Quaternion> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Quaternion> | The created animation object. |
Start(Func<VisualElement, Rect>, Rect, Int32, Action<VisualElement, Rect>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Rect> Start(Func<VisualElement, Rect> fromValueGetter, Rect to, int durationMs, Action<VisualElement, Rect> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Rect> | fromValueGetter | Callback that provides the initial value. |
Rect | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Rect> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Rect> | The created animation object. |
Start(Func<VisualElement, Single>, Single, Int32, Action<VisualElement, Single>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<float> Start(Func<VisualElement, float> fromValueGetter, float to, int durationMs, Action<VisualElement, float> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Single> | fromValueGetter | Callback that provides the initial value. |
Single | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Single> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Single> | The created animation object. |
Start(Func<VisualElement, Vector2>, Vector2, Int32, Action<VisualElement, Vector2>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Vector2> Start(Func<VisualElement, Vector2> fromValueGetter, Vector2 to, int durationMs, Action<VisualElement, Vector2> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Vector2> | fromValueGetter | Callback that provides the initial value. |
Vector2 | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Vector2> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Vector2> | The created animation object. |
Start(Func<VisualElement, Vector3>, Vector3, Int32, Action<VisualElement, Vector3>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Vector3> Start(Func<VisualElement, Vector3> fromValueGetter, Vector3 to, int durationMs, Action<VisualElement, Vector3> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Func<VisualElement, Vector3> | fromValueGetter | Callback that provides the initial value. |
Vector3 | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Vector3> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Vector3> | The created animation object. |
Start(Quaternion, Quaternion, Int32, Action<VisualElement, Quaternion>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Quaternion> Start(Quaternion from, Quaternion to, int durationMs, Action<VisualElement, Quaternion> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | from | Start value. |
Quaternion | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Quaternion> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Quaternion> | The created animation object. |
Start(Rect, Rect, Int32, Action<VisualElement, Rect>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Rect> Start(Rect from, Rect to, int durationMs, Action<VisualElement, Rect> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Rect | from | Start value. |
Rect | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Rect> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Rect> | The created animation object. |
Start(Single, Single, Int32, Action<VisualElement, Single>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<float> Start(float from, float to, int durationMs, Action<VisualElement, float> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Single | from | Start value. |
Single | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Single> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Single> | The created animation object. |
Start(StyleValues, Int32)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<StyleValues> Start(StyleValues to, int durationMs)
Parameters
Type | Name | Description |
---|---|---|
StyleValues | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Returns
Type | Description |
---|---|
ValueAnimation<StyleValues> | The created animation object. |
Start(StyleValues, StyleValues, Int32)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<StyleValues> Start(StyleValues from, StyleValues to, int durationMs)
Parameters
Type | Name | Description |
---|---|---|
StyleValues | from | Start value. |
StyleValues | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Returns
Type | Description |
---|---|
ValueAnimation<StyleValues> | The created animation object. |
Start(Vector2, Vector2, Int32, Action<VisualElement, Vector2>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Vector2> Start(Vector2 from, Vector2 to, int durationMs, Action<VisualElement, Vector2> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | from | Start value. |
Vector2 | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Vector2> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Vector2> | The created animation object. |
Start(Vector3, Vector3, Int32, Action<VisualElement, Vector3>)
Starts a transition animation on this VisualElement.
Declaration
ValueAnimation<Vector3> Start(Vector3 from, Vector3 to, int durationMs, Action<VisualElement, Vector3> onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | from | Start value. |
Vector3 | to | End value. |
Int32 | durationMs | Duration of the transition in milliseconds. |
Action<VisualElement, Vector3> | onValueChanged | Callback that applies the interpolated value. |
Returns
Type | Description |
---|---|
ValueAnimation<Vector3> | The created animation object. |
TopLeft(Vector2, Int32)
Triggers an animation changing this element's positioning style values.
Declaration
ValueAnimation<Vector2> TopLeft(Vector2 to, int durationMs)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | to | |
Int32 | durationMs |
Returns
Type | Description |
---|---|
ValueAnimation<Vector2> |