Skip to content

TweenData Documentation

Lucas Sampaio Dias edited this page Jun 25, 2018 · 23 revisions

There are many things you can do with UniTween. In fact, there are dozens of different TweenDatas and hundreds of possible commands! Below you will find what every command does for the following components:

NOTE: The information about the commands below is entirely based on DOTween's official documentation (except for TextMeshPro, TextMeshProUGUI, ParticleSystem and PostProcessVolume), as UniTween is based upon it to run. Check it out for more information on their parameters and other technical stuff.

AudioMixer

  • SetFloat: Tweens an AudioMixer's exposed float to the given value. Note that you need to manually expose a float in an AudioMixerGroup in order to be able to tween it from an AudioMixer.

AudioSource

  • Fade: Tweens an AudioSource's volume to the given value.
  • Pitch: Tweens an AudioSource's pitch to the given value.

Camera

  • Aspect: Tweens a Camera's aspect.
  • Color: Tweens a Camera's backgroundColor.
  • FarClipPlane: Tweens a Camera's farClipPlane.
  • FieldOfView: Tweens a Camera's fieldOfView.
  • NearClipPlane: Tweens a Camera's nearClipPlane.
  • OrthoSize: Tweens a Camera's orthographicSize.
  • PixelRect: Tweens a Camera's pixelRect.
  • Rect: Tweens a Camera's rect.
  • ShakePosition: Shakes a Camera's localPosition along its relative X Y axes with the given values.
  • ShakeRotation: Shakes a Camera's localRotation.

CanvasGroup

  • Fade: Fades the target's alpha to the given value.

Graphic

  • Color: Changes the target's color to the given one.
  • Fade: Fades the target's alpha to the given value.
  • BlendableColor: Tweens the target's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

Image

  • Color: Changes the target's color to the given one.
  • Fade: Fades the target's alpha to the given value.
  • FillAmount: Changes target's fillAmount to the given value (0 to 1).
  • GradientColor: Changes the target's color via the given gradient (only uses the colors, not the alphas)
  • BlendableColor: Tweens the target's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

LayoutElement

  • FlexibleSize: Changes the layoutElement's flexibleWidth/Height to the given one
  • MinSize: Changes the layoutElement's minWidth/Height to the given one
  • PreferredSize: Changes the layoutElement's preferredWidth/Height to the given one

Light

  • Color: Changes the light's color to the given one
  • Intensity: Changes the light's intensity to the given one
  • ShadowStrength: Changes the light's shadowStrength to the given one
  • BlendableColor: Tweens the target's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

LineRenderer

  • Color: Changes the target's color to the given one. Note that this tween requires to also insert the start colors for the tween, since LineRenderers have no way to get them.

MeshRenderer

  • Color: Changes the target's color to the given one.
  • ColorProperty: Changes the target's named color property (shader property) to the given one.
  • Fade: Fades the target's alpha to the given value (works only with materials that support alpha).
  • FadeProperty: Fades the target's named alpha property (shader property) to the given one.
  • Float: Changes the target's named float property (shader property) to the given one.
  • GradientColor: Changes the target's color via the given gradient (only uses the colors, not the alphas).
  • GradientColorProperty: Changes the target's named color property (shader property) via the given gradient (only uses the colors, not the alphas).
  • Offset: Changes the target's textureOffset to the given one.
  • OffsetProperty: Changes the target's named textureOffset property (shader property) to the given one.
  • Tiling: Changes the target's textureScale to the given one.
  • TilingProperty: Changes the target's named textureScale property (shader property) to the given one.
  • Vector: Changes the target's named Vector property (shader property) to the given one.
  • BlendableColor: Tweens a Material's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.
  • BlendableColorProperty: Tweens a Material's named color property (shader property) to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

Outline

  • Color: Changes the outline's color to the given one
  • Fade: Fades the outline's alpha to the given value.

ParticleSystem

NOTE: This TweenData is currently in an Experimental stage. Features might be missing and there could be changes on the future, but it's stable enough to be used already.

The commands of the ParticleSystem TweenData have different modes for each kind of data you are trying to modify (a constant value, a curve, two values, etc.). You can change any of these values, but tweening them is currently not available to all of them (an info box will appear when tweening is not available for the selected mode).

  • StartLifetime: Tweens the Start Lifetime of the ParticleSystem to the given value.
  • StartSpeed: Tweens the Start Speed of the ParticleSystem to the given value.
  • StartSize: Disables Start Size 3D and changes the Start Size of the ParticleSystem to the given value.
  • StartSizeX: Enables Start Size 3D and changes the Start Size of the ParticleSystem to the given value, tweening only the X axis.
  • StartSizeY: Enables Start Size 3D and changes the Start Size of the ParticleSystem to the given value, tweening only the Y axis.
  • StartSizeZ: Enables Start Size 3D and changes the Start Size of the ParticleSystem to the given value, tweening only the Z axis.
  • StartRotation: Disables Start Rotation 3D and changes the Start Rotation of the ParticleSystem to the given value.
  • StartRotationX: Enables Start Rotation 3D and changes the Start Rotation of the ParticleSystem to the given value, tweening only the X axis.
  • StartRotationY: Enables Start Rotation 3D and changes the Start Rotation of the ParticleSystem to the given value, tweening only the Y axis.
  • StartRotationZ: Enables Start Rotation 3D and changes the Start Rotation of the ParticleSystem to the given value, tweening only the Z axis.
  • StartColor: Tweens the Start Color value of the ParticleSystem to the given value.
  • GravityModifier: Tweens the Gravity Modifier of the ParticleSystem to the given value.
  • RateOverTime: Tweens the Rate Over Time of the ParticleSystem to the given value.
  • RateOverDistance: Tweens the Rate Over Distance of the ParticleSystem to the given value.

RectTransform

  • AnchorMax: Tweens the target's anchorMax property to the given value.
  • AnchorMin: Tweens the target's anchorMin property to the given value.
  • AnchorPos: Tweens the target's anchoredPosition to the given value.
  • AnchorPosY: Tweens the target's anchoredPosition to the given value, tweening only the chosen axis.
  • AnchorPosX: Tweens the target's anchoredPosition3D to the given value.
  • JumpAnchorPos: Tweens the target's anchoredPosition to the given value, while also applying a jump effect along the Y axis.
  • Pivot: Tweens the target's pivot to the given value.
  • PivotX: Tweens the target's pivot to the given value, tweening only the X axis.
  • PivotY: Tweens the target's pivot to the given value, tweening only the Y axis.
  • PunchAnchorPos: Punches the target's anchoredPosition with the given values.
  • ShakeAnchorPos: Shakes the target's anchoredPosition with the given values.
  • SizeDelta: Tweens the target's sizeDelta to the given value.

Rigidbody

  • Move: Moves the target's position to the given value.
  • MoveX: Moves the target's position to the given value, tweening only the X axis (note that in case of rigidbodies, the other axes will still be "locked" by the tween).
  • MoveY: Moves the target's position to the given value, tweening only the Y axis (note that in case of rigidbodies, the other axes will still be "locked" by the tween).
  • MoveZ: Moves the target's position to the given value, tweening only the Z axis (note that in case of rigidbodies, the other axes will still be "locked" by the tween).
  • Jump: Tweens the target's position to the given value, while also applying a jump effect along the Y axis.
  • Rotate: Rotates the target to the given value.
  • LookAt: Rotates the target so that it will look towards the given position.

Rigidbody2D

  • Move: Moves the target's position to the given value.
  • MoveX: Moves the target's position to the given value, tweening only the X axis (note that in case of rigidbodies, the other axes will still be "locked" by the tween).
  • MoveY: Moves the target's position to the given value, tweening only the Y axis (note that in case of rigidbodies, the other axes will still be "locked" by the tween).
  • Jump: Tweens the target's position to the given value, while also applying a jump effect along the Y axis.
  • Rotate: Rotates the target to the given value.

ScrollRect

  • NormalizedPos: Tweens the target's horizontalNormalizedPosition and verticalNormalizedPosition properties to the given value.
  • HorizontalNormalizedPos: Tweens the target's horizontalNormalizedPosition property to the given value.
  • VerticalPos: Tweens the target's verticalNormalizedPosition property to the given value.

Slider

  • Value: Changes the target's value to the given one.

SpriteRenderer

  • Color: Changes the target's color to the given one.
  • Fade: Fades the target's alpha to the given value.
  • GradientColor: Changes the target's color via the given gradient (only uses the colors, not the alphas).
  • BlendableColor: Tweens the target's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

Text

  • Color: Changes the target's color to the given one.
  • Fade: Fades the target's alpha to the given value.
  • Text: Tweens the target's text to the given value.
  • BlendableColor: Tweens the target's color to the given value, in a way that allows other BlendableColor tweens to work together on the same target, instead than fight each other as multiple Color would do.

TrailRenderer

  • Resize: Changes the TrailRenderer's startWidth/endWidth to the given ones
  • Time: Changes the target's time value to the given one

Transform

  • Move: Moves the target's position to the given value.
  • MoveX: Moves the target's position to the given value, tweening only the X axis.
  • MoveY: Moves the target's position to the given value, tweening only the Y axis.
  • MoveZ: Moves the target's position to the given value, tweening only the Z axis.
  • LocalMove: Moves the target's localPosition to the given value.
  • LocalMoveX: Moves the target's localPosition to the given value, tweening only the X axis.
  • LocalMoveY: Moves the target's localPosition to the given value, tweening only the Y axis.
  • LocalMoveZ: Moves the target's localPosition to the given value, tweening only the Z axis.
  • Jump: Tweens the target's position to the given value, while also applying a jump effect along the Y axis.
  • LocalJump: Tweens the target's localPosition to the given value, while also applying a jump effect along the Y axis.
  • Rotate: Rotates the target to the given value.
  • RotateQuaternion: Rotates the target to the given value using pure Quaternions.
  • LocalRotate: Rotates the target's localRotation to the given value.
  • LocalRotateQuaternion: Rotates the target's localRotation to the given value using pure Quaternions.
  • LookAt: Rotates the target so that it will look towards the given position.
  • Scale: Scales the target's localScale to the given value.
  • ScaleX: Scales the target's localScale to the given value while tweening only the X axis.
  • ScaleY: Scales the target's localScale to the given value while tweening only the Y axis.
  • ScaleZ: Scales the target's localScale to the given value while tweening only the Z axis.
  • PunchPosition: Punches a Transform's localPosition towards the given direction and then back to the starting one as if it was connected to the starting position via an elastic.
  • PunchRotation: Punches a Transform's localRotation towards the given size and then back to the starting one as if it was connected to the starting rotation via an elastic.
  • PunchScale: Punches a Transform's localScale towards the given size and then back to the starting one as if it was connected to the starting size via an elastic.
  • ShakePosition: Shakes a Transform's localPosition with the given values.
  • ShakeRotation: Shakes a Transform's localRotation with the given values.
  • ShakeScale: Shakes a Transform's localScale with the given values.
  • Path: Tweens a Transform's position through the given path waypoints, using the chosen path algorithm.
  • LocalPath: Tweens a Transform's localPosition through the given path waypoints, using the chosen path algorithm.
  • BlendableMoveBy: Tweens a Transform's position BY the given value (as if it was set to relative), in a way that allows other BlendableMove tweens to work together on the same target, instead than fight each other as multiple Move would do.
  • BlendableLocalMoveBy: Tweens a Transform's localPosition BY the given value (as if it was set to relative), in a way that allows other BlendableMove tweens to work together on the same target, instead than fight each other as multiple Move would do.
  • BlendableRotateBy: Tweens a Transform's rotation BY the given value (as if it was set to relative), in a way that allows other BlendableRotate tweens to work together on the same target, instead than fight each other as multiple Rotate would do.
  • BlendableLocalRotateBy: Tweens a Transform's localRotation BY the given value (as if it was set to relative), in a way that allows other BlendableRotate tweens to work together on the same target, instead than fight each other as multiple Rotate would do.
  • BlendableScaleBy: Tweens a Transform's localScale BY the given value (as if it was set to relative), in a way that allows other BlendableScale tweens to work together on the same target, instead than fight each other as multiple Scale would do.

PostProcessVolume

Commands to tween the PostProcessVolume are separated into multiple TweenDatas, one for each effect (and one for the volume itself). It's worth noticing that:

  1. All TweenDatas that tween the PostProcessVolume component have a special setting: Automatic Override. If enabled, the post-processing effect you want to tween will be automatically activated.
  2. All commands that change a numeric value must respect the bounds defined in the Inspector. For example, the Intensity of a Vignette must be a value from 0 to 1. Otherwise, visual "glitches" may appear.

Post-processing Volume

  • Weigth: Tweens the weigth of the Volume to the given value.
  • Priority: Tweens the priority of the Volume to the given value.
  • BlendDistance: Tweens the blend distance of the Volume to the given value.

Ambient Occlusion

  • Intensity: Tweens the intensity of the effect to the given value.
  • Radius: Tweens the radius of the effect to the given value.
  • Color: Tweens the color of the effect to the given color.

Auto Exposure

  • Filtering: Tweens the filtering of the effect to the given value.
  • MinimumEV: Tweens the minimum EV (minLuminance) of the effect to the given value.
  • MaximumEV: Tweens the maximum EV (maxLuminance) of the effect to the given value.
  • ExposureCompensation: Tweens the exposure compensation (keyValue) of the effect to the given value.

Bloom

  • Intensity: Tweens the intensity of the effect to the given value.
  • Threshold: Tweens the threshold of the effect to the given value.
  • SoftKnee: Tweens the soft knee of the effect to the given value.
  • Diffusion: Tweens the diffusion of the effect to the given value.
  • AnamorphicRatio: Tweens the anamorphic ratio of the effect to the given value.
  • Color: Tweens the color of the effect to the given color.
  • DirtinessIntensity: Tweens the dirtiness intensity of the effect to the given value.

Chromatic Aberration

  • Intensity: Tweens the intensity of the effect to the given value.

Color Grading

  • Temperature: Tweens the temperature of the effect to the given value.
  • Tint: Tweens the tint of the effect to the given value.
  • PostExposure: Tweens the post exposure of the effect to the given value.
  • ColorFilter: Tweens the color filter of the effect to the given color.
  • Saturation: Tweens the saturation of the effect to the given value.
  • Contrast: Tweens the contrast of the effect to the given value.
  • RedMixerRed: Tweens the red color of the red mixer of the effect to the given value.
  • RedMixerGreen: Tweens the green color of the red mixer of the effect to the given value.
  • RedMixerBlue: Tweens the blue color of the red mixer of the effect to the given value.
  • GreenMixerRed: Tweens the red color of the green mixer of the effect to the given value.
  • GreenMixerGreen: Tweens the green color of the green mixer of the effect to the given value.
  • GreenMixerBlue: Tweens the blue color of the green mixer of the effect to the given value.
  • BlueMixerRed: Tweens the red color of the blue mixer of the effect to the given value.
  • BlueMixerGreen: Tweens the green color of the blue mixer of the effect to the given value.
  • BlueMixerBlue: Tweens the blue color of the blue mixer of the effect to the given value.
  • Lift: Tweens the lift (left trackball) of the effect to the given value.
  • Gamma: Tweens the gamma (middle trackball) of the effect to the given value.
  • Gain: Tweens the gain (right trackball) of the effect to the given value.

Depth of Field

  • FocusDistance: Tweens the focus distance of the effect to the given value.
  • Aperture: Tweens the aperture of the effect to the given value.
  • FocalLength: Tweens the focal length of the effect to the given value.

Grain

  • Intensity: Tweens the intensity of the effect to the given value.
  • Size: Tweens the size of the effect to the given value.
  • LuminanceContribution: Tweens the luminance contribution of the effect to the given value.

Lens Distortion

  • Intensity: Tweens the intensity of the effect to the given value.
  • YMultiplier: Tweens the Y multiplier of the effect to the given value.
  • XMultiplier: Tweens the X multiplier of the effect to the given value.
  • CenterX: Tweens the center X of the effect to the given value.
  • CenterY: Tweens the center Y of the effect to the given value.
  • Scale: Tweens the scale of the effect to the given value.

Motion Blur

  • ShutterAngle: Tweens the shutter angle of the effect to the given value.
  • SampleCount: Tweens the sample count of the effect to the given value.

Screen Space Reflections

  • MaximumMarchDistance: Tweens the maximum march distance of the effect to the given value.
  • DistanceFade: Tweens the distance fade of the effect to the given value.
  • Vignette: Tweens the vignette of the effect to the given value.

Vignette

  • Color: Tweens the color of the effect to the given color.
  • Intensity: Tweens the intensity of the effect to the given value.
  • Smoothness: Tweens the smoothness of the effect to the given value.
  • Roundness: Tweens the roundness of the effect to the given value.
  • Opacity: Tweens the opacity of the effect to the given value.

TextMeshPro

  • Scale: Tweens the value of the font size uniformly, multiplying the given value by the font size
  • Color: Changes the target's color to the given one.
  • FaceColor: Changes the target's face color to the given one.
  • FaceFade: Fades the target's face color to the given value.
  • Fade: Fades the target's alpha to the given value.
  • FontSize: Changes the target's font size to the given value.
  • GlowColor: Changes the target's glow color to the given one.
  • MaxVisibleCharacters: Changes the target's maximum visible characters to the given value.
  • OutlineColor: Changes the target's outline color to the given one.
  • Text: Tweens the target's text to the given value. You may also activate/deactive Rich Text aswell.
  • ColorProperty: Changes the target's named color property (shader property) to the given one.
  • FloatProperty: Changes the target's named float property (shader property) to the given one.
  • TilingProperty: Changes the target's named tiling/vector2 property (shader property) to the given one.
  • VectorProperty: Changes the target's named vector/vector4 property (shader property) to the given one.

TextMeshProUGUI

  • Scale: Tweens the value of the font size uniformly, multiplying the given value by the font size
  • Color: Changes the target's color to the given one.
  • FaceColor: Changes the target's face color to the given one.
  • FaceFade: Fades the target's face color to the given value.
  • Fade: Fades the target's alpha to the given value.
  • FontSize: Changes the target's font size to the given value.
  • GlowColor: Changes the target's glow color to the given one.
  • MaxVisibleCharacters: Changes the target's maximum visible characters to the given value.
  • OutlineColor: Changes the target's outline color to the given one.
  • Text: Tweens the target's text to the given value. You may also activate/deactive Rich Text aswell.
  • ColorProperty: Changes the target's named color property (shader property) to the given one.
  • FloatProperty: Changes the target's named float property (shader property) to the given one.
  • TilingProperty: Changes the target's named tiling/vector2 property (shader property) to the given one.
  • VectorProperty: Changes the target's named vector/vector4 property (shader property) to the given one.