Mini Tween is a quick and easy tweening tool that specializes in effects and animation processing
and is highly optimized.
A tween consists of position, rotation, scale, anchoredPosition, sizeDelta, color, alpha, timer
Component
Animation Properties
A property that is common to all tweens.
Flags | You can set up Loop, PingPong, or both |
Update | Set the update method. For Manual, you must call OnUpdate directly. |
Animation | The maximum time of an 'animation curve' is 1.0 |
Delay | Startup Delay |
Duration | Total time |
Events |
FirstLastPosition - Applies to both FirstPosition and LastPosition LastPosition - Called when moving to the last position in forward play FirstPosition - Called when moving to the first position in backward play Enabled - Start event Disabled - End event |
| Preview the animation before playmode |
Tween Properties
TweenPosition
Move the position from "From" to "To"
Local | Local space |
World | World space |
Offset | World space with the parent's location as the origin |
TweenRotation
Rotate from "From" to "To"
TweenScale
Scaling from "From" to "To
TweenRTPosition
Move the "RectTransform.anchoredPosition" from "From" to "To"
TweenRTSize
Resize "RectTransform.sizeDelta" from "From" to "To"
TweenColor
Change the color from "From" to "To".
Supported components are "Image, RawImage, Text, SpriteRenderer, CanvasRenderer, Renderer",
which means most components are supported.
TweenAlpha
Change the alpha from "From" to "To".
Supported components are "Image, RawImage, Text, SpriteRenderer, CanvasRenderer, Renderer",
which means most components are supported.
TweenTimer
Call "On Updated" on every update.
TweenGroup
You can group tweens together to manage them.
API
ITween
All tweens except "TweenGroup" inherit from ITween.
enabled | Play/Stop Tween |
Duration | Total time |
Forward | Playback Direction |
NormalizedPosition | Playback position |
OnUpdate | For manual update, call required externally. |
Play | Make the tween playing |
PlayForward | Play in the forward direction. The starting position can be passed as an argument. |
PlayReserve | Play backwards. The starting position can be passed as an argument. |
Toggle | Toggle the playback direction. |
Evaluate | Apply the properties of normalizedPosition. |
GetEvent | Gets the Events (UnityEvent) for a specific When. If the event doesn't exist, it's created. |
Tween Group
PlayAutomatically | Automatically play tweens on enable. |
Tweens | Tweens in the group. |
Play | Make the tweens playing. |
PlayForward | Play in the forward direction. The starting position can be passed as an argument. |
PlayReserve | Play backwards. The starting position can be passed as an argument. |
Toggle | Toggle the playback direction. |
Stop | Stop the tweens from playing. |
SetNormalizedPosition | Change the playback position. |
Evaluate | Apply the properties of normalizedPosition. |