TweenManager
controls all running Tweens and updates all Steps every frame. Tween
controls both queued and concurrent TweenActions. TweenAction
controls a list of TweenActionValues that will ease concurrently. TweenActionValue
controls the target values.
Tween
is mainly used to build an action timeline, and then fill the timeline with actions. TweenAction
can be created manually, but in most cases, the engine has extended a large number of existing Unity Objects
.
Such as Transform
can directly call the method with the Action
prefix to create a TweenAction
, just like transform.ActionMoveX(float x, float duration)
.
Both Tween
and TweenAction
support chained calls to set properties, including ease
, isRelative
, callback
and more.
The detailed relationships of engine objects can be found in the Code Architecture diagram.
- Tween
- TweenExtensions
- TweenAction
- TweenActionExtensions
- TweenActionAPIExtensions
- Transform Move
- Transform Local Move
- Transform Scale
- Transform Rotate
- Transform Local Rotate
- Transform Shake Position
- Transform Shake Scale
- Transform Shake Rotation
- Transform Bezier Quadratic Move
- Transform Bezier Quadratic Local Move
- Transform Bezier Cubic Move
- Transform Bezier Cubic Local Move
- RectTransform Move
- RectTransform OffsetMax
- RectTransform OffsetMin
- RectTransform SizeDelta
- RectTransform Size
- Graphic Color
- CanvasGroup Color
- SpriteRenderer Color
- AudioSource Volume
- Material Values
- TweenManager
-
static Tween Create(bool isRecyclable = true)
Creates a Tween.
If [isRecyclable] is true then the Tween will be auto recycled when it is completed — so don't hold a Tween and always create a new one.
If [isRecyclable] is false then the Tween needs to be recycled manually by SetRecyclable — so the Tween can be Restart or Rewind.// auto recycle var tween = Tween.Create(); // manual recycle var tween = Tween.Create(false); // recycle tween tween.SetRecyclable(true);
-
static Tween PlayDelayCallback(float delay, Action Callback)
Plays the callback with delay time.
Tween.PlayDelayCallback(1.0f, MyDelayCallbackAction);
-
Tween Append(TweenAction action)
Appends the TweenAction to the queue.
Tween.Create() .Append(MyQueueTweenAction1) .Append(MyQueueTweenAction2) .Play();
-
Tween AppendInterval(float interval)
Appends the interval time to the queue.
Tween.Create() .AppendInterval(0.8f) .Append(MyQueueTweenAction1) .AppendInterval(1.5f) .Append(MyQueueTweenAction2) .Play();
-
Tween AppendCallback(Action Callback)
Appends the callback to the queue.
Tween.Create() .AppendInterval(0.8f) .AppendCallback(MyQueueCallbackAction1) .AppendInterval(1.5f) .AppendCallback(MyQueueCallbackAction2) .Play();
-
Tween AppendIntervalCallback(float interval, Action Callback)
Appends the interval time with callback to the queue.
Tween.Create() .Append(MyQueueTweenAction1) .AppendIntervalCallback(0.7f, MyQueueCallbackAction2) .Play();
-
Tween Add(TweenAction action)
Adds the TweenAction to the concurrent array.
Tween.Create() .Add(MyConcurrentTweenAction1) .Add(MyConcurrentTweenAction2) .Play();
-
Tween AddDelay(float delay, TweenAction action)
Adds the delay TweenAction to the concurrent array.
Tween.Create() .AddDelay(0.0f, MyConcurrentTweenAction1) .AddDelay(0.2f, MyConcurrentTweenAction2) .AddDelay(0.4f, MyConcurrentTweenAction3) .Play();
-
Tween AddDelayAfterAppend(float delay, TweenAction action)
Adds the delay TweenAction after the last Appended to the concurrent array.
Tween.Create() .Append(MyQueueTweenAction1) .AddDelayAfterAppend(0.2f, MyConcurrentTweenAction1) .Play();
-
Tween AddDelayAfterAdd(float delay, TweenAction action)
Adds the delay TweenAction after the last Added to the concurrent array.
Tween.Create() .Add(MyConcurrentTweenAction1) .AddDelayAfterAdd(0.2f, MyConcurrentTweenAction2) .Play();
-
Tween AddAfterAppend(TweenAction action)
Adds the TweenAction after the last Appended to the concurrent array.
Tween.Create() .Append(MyQueueTweenAction1) .AddAfterAppend(MyConcurrentTweenAction1) .Play();
-
Tween AddAfterAdd(TweenAction action)
Adds the TweenAction after the last Added to the concurrent array.
Tween.Create() .Add(MyConcurrentTweenAction1) .AddAfterAdd(MyConcurrentTweenAction2) .AddAfterAdd(MyConcurrentTweenAction3) .Play();
-
Tween AddCallback(Action Callback)
Adds the callback to the concurrent array.
Tween.Create() .AddCallback(MyConcurrentCallbackAction1) .AddCallback(MyConcurrentCallbackAction2) .Play();
-
Tween AddCallbackAfterAppend(Action Callback)
Adds the callback after the last Appended to the concurrent array.
Tween.Create() .AppendCallback(MyQueueCallbackAction1) .AddCallbackAfterAppend(MyConcurrentCallbackAction1) .AppendCallback(MyQueueCallbackAction2) .AddCallbackAfterAppend(MyConcurrentCallbackAction2) .Play();
-
Tween AddCallbackAfterAdd(Action Callback)
Adds the callback after the last Added to the concurrent array.
Tween.Create() .AddCallback(MyConcurrentCallbackAction1) .AddCallbackAfterAdd(MyConcurrentCallbackAction2) .AddCallbackAfterAdd(MyConcurrentCallbackAction3) .Play();
-
Tween AddDelayCallback(float delay, Action Callback)
Adds the delay callback to the concurrent array.
Tween.Create() .AddDelayCallback(1.0f, MyConcurrentCallbackAction1) .AddDelayCallback(2.8f, MyConcurrentCallbackAction2) .AddDelayCallback(3.0f, MyConcurrentCallbackAction3) .Play();
-
Tween AddDelayCallbackAfterAppend(float delay, Action Callback)
Adds the delay callback after the last Appended to the concurrent array.
Tween.Create() .Append(MyQueueTweenAction1) .AddDelayCallbackAfterAppend(1.0f, MyConcurrentCallbackAction1) .Play();
-
Tween AddDelayCallbackAfterAdd(float delay, Action Callback)
Adds the delay callback after the last Added to the concurrent array.
Tween.Create() .Add(MyConcurrentTweenAction1) .AddDelayCallbackAfterAdd(1.0f, MyConcurrentCallbackAction1) .Play();
-
Tween SetOnStart(Action OnStart)
Sets the [OnStart] callback which is called when the Tween starts (Play or Rewind).
Tween.Create().SetOnStart(MyStartAction);
-
Tween SetOnUpdate(Action<float> OnUpdate)
Sets the [OnUpdate] callback which is called when the Tween updates (Play or Rewind).
The float param is the Tween time ranging between [0.0, 1.0].Tween.Create().SetOnUpdate(MyUpdateAction);
-
Tween SetOnComplete(Action OnComplete)
Sets the [OnComplete] callback which is called when the Tween completes (Play or Rewind).
Tween.Create().SetOnComplete(MyCompleteAction);
-
Tween SetOnStop(Action OnStop)
Sets the [OnStop] callback which is called when the Tween stops (Play or Rewind).
Tween.Create().SetOnStop(MyStopAction);
-
Tween SetOnRecycle(Action OnRecycle)
Sets the [OnRecycle] callback which is called when the Tween recycles.
Tip: can use it to clear data bound to Tweens.Tween.Create().SetOnRecycle(MyRecycleAction);
-
Tween SetDefaultEase(TweenEase ease)
Sets the [ease] of Add or Append TweenAction, default Smooth.
Only sets the TweenAction whose [ease] is Smooth.Tween.Create().SetDefaultEase(TweenEase.ExponentialOut);
-
Tween SetDefaultRelative(bool isRelative)
Sets the [isRelative] of Add or Append TweenActions, default false.
Only sets the TweenAction whose [isRelative] is false.Tween.Create().SetDefaultRelative(true);
-
Tween SetRecyclable(bool isRecyclable)
Sets the Tween to recyclable.
If true and the Tween State is Setup or Completed or Stopped then recycle it immediately, else wait until it is completed and recycle it.
-
Tween Play()
Plays the Tween.
-
Tween Rewind()
Rewinds the Tween.
The Tween cannot be recyclable!
-
Tween Restart()
Restarts the Tween (Play or Rewind).
The Tween cannot be recyclable!
-
Tween GotoStart()
Goto the start of Tween (Play or Rewind).
The Tween cannot be recyclable!
-
Tween GotoEnd()
Goto the end of Tween (Play or Rewind). The Tween cannot be recyclable!
-
Tween Reverse()
Reverses the Tween (Play or Rewind).
If Tween is Completed then reverse the previous Play or Rewind, else reverse the Playing or Rewinding.
-
Tween Stop()
Stops the Tween Playing or Rewinding.
If the Tween is recyclable then it will be recycled.
-
void Pause(bool isPause)
Pauses or resumes the Tween Playing or Rewinding.
-
bool IsSetup()
Whether the Tween state is Setup?
-
bool IsPlaying()
Whether the Tween state is Playing?
-
bool IsRewinding()
Whether the Tween state is Rewinding?
-
bool IsRunning()
Whether the Tween state is Playing or Rewinding?
-
bool IsPaused()
Whether the Tween state is Paused?
-
bool IsStopping()
Whether the Tween state is Stopping?
-
bool IsStopped()
Whether the Tween state is Stopped?
-
bool IsStoppedByPlay()
Whether the Tween state is Stopped by play?
-
bool IsStoppedByRewind()
Whether the Tween state is Stopped by rewind?
-
bool IsCompleted()
Whether the Tween state is Completed?
-
bool IsCompletedByPlay()
Whether the Tween state is Completed by play?
-
bool IsCompletedByRewind()
Whether the Tween state is Completed by rewind?
-
bool IsRecycled()
Whether the Tween is Recycled?
-
bool IsOPRestart()
Whether the Tween operation is Restart?
Uses in TweenAction callback.
-
bool IsOPGotoStart()
Whether the Tween operation is GotoStart?
Uses in TweenAction callback.
-
bool IsOPGotoEnd()
Whether the Tween operation is GotoEnd?
Uses in TweenAction callback.
-
void TogglePause()
Toggles the Tween state between Playing or Rewinding and Pausing.
-
Tween SetOnStartByPlay(Action OnStartByPlay)
Sets the callback when the Tween starts by play.
-
Tween SetOnStartByRewind(Action OnStartByRewind)
Sets the callback when the Tween starts by rewind.
-
Tween SetOnStopByPlay(Action OnStopByPlay)
Sets the callback when the Tween stops by play.
-
Tween SetOnStopByRewind(Action OnStopByRewind)
Sets the callback when the Tween stops by rewind.
-
Tween SetOnCompleteByPlay(Action OnCompleteByPlay)
Sets the callback when the Tween completes by play.
-
Tween SetOnCompleteByRewind(Action OnCompleteByRewind)
Sets the callback when the Tween completes by rewind.
-
Tween SetOnCompleteByRewind(Action OnCompleteByRewind)
Sets the callback when the Tween completes by rewind.
-
Tween SetLoops(int loops, bool isRewindToStart = false, Action OnCompleteByLoops = null)
Sets the number of Tween play repeats.
Repeated calls will add [loops] and [OnCompleteByLoops].[loops] : -1 means infinite loops.
[isRewindToStart] : Whether the Tween to rewinds when a loop is completed? — false to restart.
[OnCompleteByLoops]: Callback when all loops are completed.tween.SetLoops(1) .SetLoops(2, true, () => tween.Rewind().SetOnComplete(() => tween.SetRecyclable(true))) .Play();
-
static TweenAction CreateFloat(Func OnGetTargetFloat, Action OnSetTargetFloat, float finalValue, float duration)
Creates a TweenAction ease to float.
TweenAction.CreateFloat ( () => transform.position.x, (value) => transform.SetPositionX(value), toFloatX, duration );
-
static TweenAction CreateVector2(OnGetTargetVector2 OnGetTargetVector2, OnSetTargetVector2 OnSetTargetVector2, in Vector2 finalValues, float duration)
Creates a TweenAction ease to vector2.
TweenAction.CreateVector2 ( (out Vector2 vector2) => vector2 = transform.position, (in Vector2 vector2) => transform.SetPositionXY(vector2), toV2, duration );
-
static TweenAction CreateVector3(OnGetTargetVector3 OnGetTargetVector3, OnSetTargetVector3 OnSetTargetVector3, in Vector3 finalValues, float duration)
Creates a TweenAction ease to vector3.
TweenAction.CreateVector3 ( (out Vector3 vector3) => vector3 = transform.position, (in Vector3 vector3) => transform.position = vector3, toV3, duration );
-
static TweenAction CreateVector4(OnGetTargetVector4 OnGetTargetVector4, OnSetTargetVector4 OnSetTargetVector4, in Vector4 finalValues, float duration)
Creates a TweenAction ease to vector4.
TweenAction.CreateVector4 ( (out Vector4 vector4) => vector4 = graphic.color, (in Vector4 vector4) => graphic.color = vector4, toColor, duration );
-
TweenAction SetOnStart(Action OnStart)
Sets the [OnStart] callback which is called when the TweenAction starts (Play or Rewind).
-
TweenAction SetOnUpdate(Action<float> OnUpdate)
Sets the [OnUpdate] callback which is called when the TweenAction updates (Play or Rewind).
The float param is the TweenAction time ranging between [0.0, 1.0].
-
TweenAction SetOnComplete(Action OnComplete)
Sets the [OnComplete] callback which is called when the TweenAction completes (Play or Rewind).
-
TweenAction SetRelative(bool isRelative)
Sets the [isRelative] of all TweenActionValues, default false.
-
TweenAction SetRelativeAt(int index, bool isRelative)
Sets the [isRelative] of TweenActionValue at index, default false.
-
TweenAction SetEase(TweenEase ease)
Sets the [ease] of all TweenActionValues, default Smooth.
-
TweenAction SetEaseAt(int index, TweenEase ease)
Sets the [ease] of TweenActionValue at index, default Smooth.
-
TweenAction SetExtraParams(params float[] extraParams)
Sets the [extraParams] to TweenEase.
TweenAction.CreateFloat(...) .SetRelative(true) .SetEase(TweenEase.ShakeX) .SetExtraParams(amplitude, speed);
-
Tween Play()
Plays the TweenAction.
audioSource.ActionVolumeTo(toValue, duration).Play();
-
Tween PlayDelay(float delay)
Plays the delay TweenAction.
-
TweenAction ActionMoveX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that moves the Transform position x/y/z to [x/y/z].
-
TweenAction ActionMoveXY([in Vector2 v2/float x, float y/Transform target], float duration)
Creates a TweenAction that moves the Transform position xy to [v2]/[xy]/[target].
-
TweenAction ActionMoveXZ([in Vector2 v2/float x, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform position xz to [v2]/[xz]/[target].
-
TweenAction ActionMoveYZ([in Vector2 v2/float y, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform position yz to [v2]/[yz]/[target].
-
TweenAction ActionMove([in Vector3 v3/float x, float y, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform position to [v3]/[xyz]/[target].
-
TweenAction ActionLocalMoveX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that moves the Transform localPosition x/y/z to [x]/[y]/[z].
-
TweenAction ActionLocalMoveXY([in Vector2 v2/float x, float y/Transform target], float duration)
Creates a TweenAction that moves the Transform localPosition xy to [v2]/[xy]/[target].
-
TweenAction ActionLocalMoveXZ([in Vector2 v2/float x, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform localPosition xz to [v2]/[xz]/[target].
-
TweenAction ActionLocalMoveYZ([in Vector2 v2/float y, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform localPosition yz to [v2]/[yz]/[target].
-
TweenAction ActionLocalMove([in Vector3 v3/float x, float y, float z/Transform target], float duration)
Creates a TweenAction that moves the Transform localPosition to [v3]/[xyz]/[target].
-
TweenAction ActionScaleX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that scales the Transform localScale x/y/z to [x]/[y]/[z].
-
TweenAction ActionScaleXY([in Vector2 v2/float x, float y/float value/Transform target], float duration)
Creates a TweenAction that scales the Transform localScale xy to [v2]/[xy]/[value]/[target].
-
TweenAction ActionScaleXZ([in Vector2 v2/float x, float z/float value/Transform target], float duration)
Creates a TweenAction that scales the Transform localScale xz to [v2]/[xz]/[value]/[target].
-
TweenAction ActionScaleYZ([in Vector2 v2/float y, float z/float value/Transform target], float duration)
Creates a TweenAction that scales the Transform localScale yz to [v2]/[yz]/[value]/[target].
-
TweenAction ActionScale([in Vector3 v3/float x, float y, float z/float value/Transform target], float duration)
Creates a TweenAction that scales the Transform localScale to [v3]/[xyz]/[value]/[target].
-
TweenAction ActionRotateX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that rotates the Transform eulerAngles x/y/z to [x]/[y]/[z].
-
TweenAction ActionRotateXY([in Vector2 v2/float x, float y/Transform target], float duration)
Creates a TweenAction that rotates the Transform eulerAngles xy to [v2]/[xy]/[target].
-
TweenAction ActionRotateXZ([in Vector2 v2/float x, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform eulerAngles xz to [v2]/[xz]/[target].
-
TweenAction ActionRotateYZ([in Vector2 v2/float y, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform eulerAngles yz to [v2]/[xz]/[target].
-
TweenAction ActionRotate([in Vector3 v3/float x, float y, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform eulerAngles to [v3]/[xyz]/[target].
-
TweenAction ActionLocalRotateX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that rotates the Transform localEulerAngles x/y/z to [x]/[y]/[z].
-
TweenAction ActionLocalRotateXY([in Vector2 v2/float x, float y/Transform target], float duration)
Creates a TweenAction that rotates the Transform localEulerAngles xy to [v2]/[xy]/[target].
-
TweenAction ActionLocalRotateXZ([in Vector2 v2/float x, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform localEulerAngles xz to [v2]/[xz]/[target].
-
TweenAction ActionLocalRotateYZ([in Vector2 v2/float y, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform localEulerAngles yz to [v2]/[yz]/[target].
-
TweenAction ActionLocalRotate([in Vector3 v3/float x, float y, float z/Transform target], float duration)
Creates a TweenAction that rotates the Transform localEulerAngles to [v3]/[xyz]/[target].
-
TweenAction ActionShakePositionX/Y/Z(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform position x/y/z by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakePositionXY/XZ/YZ(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform position xy/xz/yz by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakePosition(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform position by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeScaleX/Y/Z(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform scale x/y/z by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeScaleXY/XZ/YZ(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform scale xy/xz/yz by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeScale(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform scale by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeRotationX/Y/Z(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform rotation x/y/z by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeRotationXY/XZ/YZ(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform rotation xy/xz/yz by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionShakeRotation(float amplitude, float speed, float duration)
Creates a TweenAction that shakes the Transform rotation by [amplitude] and [speed].
Note: don't change the isRelative and TweenEase of this TweenAction.
-
TweenAction ActionBezier2MoveXY([in Vector2 v2/float x, float y/Transform target], [in Vector2 controlPos/float controlPosX, float controlPosY/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform position xy to [v2]/[xy]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2MoveXY(toVector2, controlPosVector2, duration); transform.ActionBezier2MoveXY(toX, toY, controlPosX, controlPosY, duration); transform.ActionBezier2MoveXY(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2MoveXZ([in Vector2 v2/float x, float z/Transform target], [in Vector2 controlPos/float controlPosX, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform position xz to [v2]/[xz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2MoveXZ(toVector2, controlPosVector2, duration); transform.ActionBezier2MoveXZ(toX, toZ, controlPosX, controlPosZ, duration); transform.ActionBezier2MoveXZ(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2MoveYZ([in Vector2 v2/float y, float z/Transform target], [in Vector2 controlPos/float controlPosY, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform position yz to [v2]/[yz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2MoveYZ(toVector2, controlPosVector2, duration); transform.ActionBezier2MoveYZ(toY, toZ, controlPosY, controlPosZ, duration); transform.ActionBezier2MoveYZ(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2Move([in Vector3 v3/float x, float y, float z/Transform target], [in Vector3 controlPos/float controlPosX, float controlPosY, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform position to [v3]/[xyz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2Move(toVector3, controlPosVector3, duration); transform.ActionBezier2Move(toX, toY, toZ, controlPosX, controlPosY, controlPosZ, duration); transform.ActionBezier2Move(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2LocalMoveXY([in Vector2 v2/float x, float y/Transform target], [in Vector2 controlPos/float controlPosX, float controlPosY/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform localPosition xy to [v2]/[xy]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2LocalMoveXY(toVector2, controlPosVector2, duration); transform.ActionBezier2LocalMoveXY(toX, toY, controlPosX, controlPosY, duration); transform.ActionBezier2LocalMoveXY(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2LocalMoveXZ([in Vector2 v2/float x, float z/Transform target], [in Vector2 controlPos/float controlPosX, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform localPosition xz to [v2]/[xz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2LocalMoveXZ(toVector2, controlPosVector2, duration); transform.ActionBezier2LocalMoveXZ(toX, toZ, controlPosX, controlPosZ, duration); transform.ActionBezier2LocalMoveXZ(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2LocalMoveYZ([in Vector2 v2/float y, float z/Transform target], [in Vector2 controlPos/float controlPosY, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform localPosition yz to [v2]/[yz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2LocalMoveYZ(toVector2, controlPosVector2, duration); transform.ActionBezier2LocalMoveYZ(toY, toZ, controlPosY, controlPosZ, duration); transform.ActionBezier2LocalMoveYZ(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier2LocalMove([in Vector3 v3/float x, float y, float z/Transform target], [in Vector3 controlPos/float controlPosX, float controlPosY, float controlPosZ/Transform controlPos], float duration)
Creates a TweenAction that moves the Transform localPosition to [v3]/[xyz]/[target] by bezier2 with [controlPos].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier2LocalMove(toVector3, controlPosVector3, duration); transform.ActionBezier2LocalMove(toX, toY, toZ, controlPosX, controlPosY, controlPosZ, duration); transform.ActionBezier2LocalMove(toTransform, controlPosTransform, duration);
-
TweenAction ActionBezier3MoveXY([in Vector2 v2/float x, float y/Transform target], [in Vector2 controlPos1/float controlPos1X, float controlPos1Y/Transform controlPos1], [in Vector2 controlPos2/float controlPos2X, float controlPos2Y/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform position xy to [v2]/[xy]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3MoveXY(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3MoveXY(toX, toY, controlPos1X, controlPos1Y, controlPos2X, controlPos2Y, duration); transform.ActionBezier3MoveXY(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3MoveXZ([in Vector2 v2/float x, float z/Transform target], [in Vector2 controlPos1/float controlPos1X, float controlPos1Z/Transform controlPos1], [in Vector2 controlPos2/float controlPos2X, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform position xz to [v2]/[xz]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3MoveXZ(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3MoveXZ(toX, toZ, controlPos1X, controlPos1Z, controlPos2X, controlPos2Z, duration); transform.ActionBezier3MoveXZ(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3MoveYZ([in Vector2 v2/float y, float z/Transform target], [in Vector2 controlPos1/float controlPos1Y, float controlPos1Z/Transform controlPos1], [in Vector2 controlPos2/float controlPos2Y, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform position yz to [v2]/[yz]/[target] bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3MoveYZ(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3MoveYZ(toY, toZ, controlPos1Y, controlPos1Z, controlPos2Y, controlPos2Z, duration); transform.ActionBezier3MoveYZ(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3Move([in Vector3 v3/float x, float y, float z/Transform target], [in Vector3 controlPos1/float controlPos1X, float controlPos1Y, float controlPos1Z/Transform controlPos1], [in Vector3 controlPos2/float controlPos2X, float controlPos2Y, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform position to [v3]/[xyz]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3Move(toVector3, controlPos1Vector3, controlPos2Vector3, duration); transform.ActionBezier3Move(toX, toY, toZ, controlPos1X, controlPos1Y, controlPos1Z, controlPos2X, controlPos2Y, controlPos2Z, duration); transform.ActionBezier3Move(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3LocalMoveXY([in Vector2 v2/float x, float y/Transform target], [in Vector2 controlPos1/float controlPos1X, float controlPos1Y/Transform controlPos1], [in Vector2 controlPos2/float controlPos2X, float controlPos2Y/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform localPosition xy to [v2]/[xy]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3LocalMoveXY(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3LocalMoveXY(toX, toY, controlPos1X, controlPos1Y, controlPos2X, controlPos2Y, duration); transform.ActionBezier3LocalMoveXY(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3LocalMoveXZ([in Vector2 v2/float x, float z/Transform target], [in Vector2 controlPos1/float controlPos1X, float controlPos1Z/Transform controlPos1], [in Vector2 controlPos2/float controlPos2X, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform localPosition xz to [v2]/[xz]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3LocalMoveXZ(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3LocalMoveXZ(toX, toZ, controlPos1X, controlPos1Z, controlPos2X, controlPos2Z, duration); transform.ActionBezier3LocalMoveXZ(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3LocalMoveYZ([in Vector2 v2/float y, float z/Transform target], [in Vector2 controlPos1/float controlPos1Y, float controlPos1Z/Transform controlPos1], [in Vector2 controlPos2/float controlPos2Y, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform localPosition yz to [v2]/[yz]/[target] bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3LocalMoveYZ(toVector2, controlPos1Vector2, controlPos2Vector2, duration); transform.ActionBezier3LocalMoveYZ(toY, toZ, controlPos1Y, controlPos1Z, controlPos2Y, controlPos2Z, duration); transform.ActionBezier3LocalMoveYZ(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionBezier3LocalMove([in Vector3 v3/float x, float y, float z/Transform target], [in Vector3 controlPos1/float controlPos1X, float controlPos1Y, float controlPos1Z/Transform controlPos1], [in Vector3 controlPos2/float controlPos2X, float controlPos2Y, float controlPos2Z/Transform controlPos2], float duration)
Creates a TweenAction that moves the Transform localPosition to [v3]/[xyz]/[target] by bezier3 with [controlPos1] and [controlPos2].
Note: don't change the TweenEase of this TweenAction.transform.ActionBezier3LocalMove(toVector3, controlPos1Vector3, controlPos2Vector3, duration); transform.ActionBezier3LocalMove(toX, toY, toZ, controlPos1X, controlPos1Y, controlPos1Z, controlPos2X, controlPos2Y, controlPos2Z, duration); transform.ActionBezier3LocalMove(toTransform, controlPos1Transform, controlPos2Transform, duration);
-
TweenAction ActionMoveAnchoredX/Y/Z([float x/float y/float z], float duration)
Creates a TweenAction that moves the RectTransform anchoredPosition x/y/z to [x]/[y]/[z].
-
TweenAction ActionMoveAnchoredXY([in Vector2 v2/float x, float y/RectTransform target], float duration)
Creates a TweenAction that moves the RectTransform anchoredPosition xy to [v2]/[xy]/[target].
-
TweenAction ActionMoveAnchored([in Vector3 v3/float x, float y, float z/RectTransform target], float duration)
Creates a TweenAction that moves the RectTransform anchoredPosition3D to [v3]/[xyz]/[target].
-
TweenAction ActionOffsetMaxX/Y([float x/float y], float duration)
Creates a TweenAction that changes the RectTransform offsetMax x/y to [x]/[y].
-
TweenAction ActionOffsetMax([in Vector2 v2/float x, float y/RectTransform target], float duration)
Creates a TweenAction that changes the RectTransform offsetMax to [v2]/[xy]/[target].
-
TweenAction ActionOffsetMinX/Y([float x/float y], float duration)
Creates a TweenAction that changes the RectTransform offsetMin x/y to [x]/[y].
-
TweenAction ActionOffsetMin([in Vector2 v2/float x, float y/RectTransform target], float duration)
Creates a TweenAction that changes the RectTransform offsetMin to [v2]/[xy]/[target].
-
TweenAction ActionSizeDeltaX/Y([float x/float y], float duration)
Creates a TweenAction that changes the RectTransform sizeDelta x/y to [x]/[y].
-
TweenAction ActionSizeDelta([in Vector2 v2/float x, float y/RectTransform target], float duration)
Creates a TweenAction that changes the RectTransform sizeDelta to [v2]/[xy]/[target].
-
TweenAction ActionSizeX/Y([float x/float y], float duration)
Creates a TweenAction that changes the RectTransform size x/y to [x]/[y].
-
TweenAction ActionSize([in Vector2 v2/float x, float y/RectTransform target], float duration)
Creates a TweenAction that changes the RectTransform size to [v2]/[xy]/[target].
-
TweenAction ActionFadeTo(float alpha, float duration)
Creates a TweenAction that fades the Graphic color alpha to [alpha].
-
TweenAction ActionFadeIn/Out(float duration)
Creates a TweenAction that fades the Graphic color alpha to [1.0f]/[0.0f].
-
TweenAction ActionColorTo(in Color color, float duration)
Creates a TweenAction that changes the Graphic color to [color].
-
TweenAction ActionRGBTo(in Color color, float duration)
Creates a TweenAction that changes the Graphic color rgb to [color].
-
TweenAction ActionFadeTo(float alpha, float duration)
Creates a TweenAction that fades the CanvasGroup alpha to [alpha].
-
TweenAction ActionFadeIn/Out(float duration)
Creates a TweenAction that fades the CanvasGroup alpha to [1.0f]/[0.0f].
-
TweenAction ActionFadeTo(float alpha, float duration)
Creates a TweenAction that fades the SpriteRenderer color alpha to [alpha].
-
TweenAction ActionFadeIn/Out(float duration)
Creates a TweenAction that fades the SpriteRenderer color alpha to [1.0f]/[0.0f].
-
TweenAction ActionColorTo(in Color color, float duration)
Creates a TweenAction that changes the SpriteRenderer color to [color].
-
TweenAction ActionRGBTo(in Color color, float duration)
Creates a TweenAction that changes the SpriteRenderer color rgb to [color].
-
TweenAction ActionVolumeTo(float volume, float duration)
Creates a TweenAction that changes the AudioSource volume to [volume].
-
TweenAction ActionVolumeIn/Out(float duration)
Creates a TweenAction that changes the AudioSource volume to [1.0f]/[0.0f].
-
TweenAction ActionFloatColorTo(string name, float value, float duration)
Creates a TweenAction that changes the Material float to [value] by [name].
-
TweenAction ActionIntTo(string name, int value, float duration)
Creates a TweenAction that changes the Material int to [value] by [name].
-
TweenAction ActionVectorTo(string name, in Vector4 v4, float duration)
Creates a TweenAction that changes the Material vector to [v4] by [name].
-
TweenAction ActionColorTo(string name, in Color color, float duration)
Creates a TweenAction that changes the Material color to [color] by [name].
-
static bool IsAnyUpdating()
Is there any Tween updating?
-
static void StopAll()
Stops all updating Tweens Playing or Rewinding.
If the Tween is recyclable then it will be recycled on completion.
-
static void RestartAll()
Restarts all updating Tweens Playing or Rewinding.
-
static void ReverseAll()
Reverses all updating Tweens Playing or Rewinding.
-
static void RewindAll()
Rewinds all updating Tweens Playing or Rewinding.
-
static PauseAll(bool isPause)
Pauses or resumes all updating Tweens Playing or Rewinding.
-
static void TogglePauseAll()
Toggles all updating Tweens state between Playing or Rewinding and Paused.
-
static void SetRecyclableAll(bool isRecyclable)
Sets all updating Tweens to recyclable.
-
static void RecycleAll()
Stops all updating Tweens and Recycles all unrecycled Tweens.
-
static void Update()
Updates all Tweens, called every frame.
-
static void DisposeAllNativeData()
Disposes all native data with Allocator.Persistent, called when ApplicationQuit.
If not dispose the native data, calling the Finalize of DisposeSentinel by GC, will cause an editor error when app quit.