DOTween  0.8.530
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
DOTween Class Reference

Main DOTween class. Contains static methods to create and control tweens in a generic way More...

Static Public Member Functions

static IDOTweenInit Init (bool recycleAllByDefault=false, bool useSafeMode=true, LogBehaviour logBehaviour=LogBehaviour.ErrorsOnly)
 Must be called once, before the first ever DOTween call/reference, otherwise it will be called automatically and will use default options. Calling it a second time won't have any effect. More...
 
static void SetTweensCapacity (int tweenersCapacity, int sequencesCapacity)
 Directly sets the current max capacity of Tweeners and Sequences (meaning how many Tweeners and Sequences can be running at the same time), so that DOTween doesn't need to automatically increase them in case the max is reached (which might lead to hiccups when that happens). Sequences capacity must be less or equal to Tweeners capacity (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). Beware: use this method only when there are no tweens running. More...
 
static void Clear (bool destroy=false)
 Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values. More...
 
static void ClearCachedTweens ()
 Clears all cached tween pools. More...
 
static TweenerCore< float,
float, FloatOptions > 
To (DOGetter< float > getter, DOSetter< float > setter, float endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static Tweener To (DOGetter< int > getter, DOSetter< int > setter, int endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static Tweener To (DOGetter< uint > getter, DOSetter< uint > setter, uint endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< string,
string, StringOptions > 
To (DOGetter< string > getter, DOSetter< string > setter, string endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Vector2,
Vector2, VectorOptions > 
To (DOGetter< Vector2 > getter, DOSetter< Vector2 > setter, Vector2 endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Vector3,
Vector3, VectorOptions > 
To (DOGetter< Vector3 > getter, DOSetter< Vector3 > setter, Vector3 endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Vector4,
Vector4, VectorOptions > 
To (DOGetter< Vector4 > getter, DOSetter< Vector4 > setter, Vector4 endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Quaternion,
Vector3, QuaternionOptions > 
To (DOGetter< Quaternion > getter, DOSetter< Quaternion > setter, Vector3 endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Color,
Color, ColorOptions > 
To (DOGetter< Color > getter, DOSetter< Color > setter, Color endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< Rect, Rect,
RectOptions > 
To (DOGetter< Rect > getter, DOSetter< Rect > setter, Rect endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static Tweener To (DOGetter< RectOffset > getter, DOSetter< RectOffset > setter, RectOffset endValue, float duration)
 Tweens a property or field to the given value using default plugins More...
 
static TweenerCore< T1, T2,
TPlugOptions > 
To< T1, T2, TPlugOptions > (ABSTweenPlugin< T1, T2, TPlugOptions > plugin, DOGetter< T1 > getter, DOSetter< T1 > setter, T2 endValue, float duration)
 Tweens a property or field to the given value using a custom plugin More...
 
static TweenerCore< Vector3,
Vector3, VectorOptions > 
ToAxis (DOGetter< Vector3 > getter, DOSetter< Vector3 > setter, float endValue, float duration, AxisConstraint axisConstraint=AxisConstraint.X)
 Tweens only one axis of a Vector3 to the given value using default plugins. More...
 
static Tweener ToAlpha (DOGetter< Color > getter, DOSetter< Color > setter, float endValue, float duration)
 Tweens only the alpha of a Color to the given value using default plugins More...
 
static Tweener To (DOSetter< float > setter, float startValue, float endValue, float duration)
 Tweens a virtual property from the given start to the given end value and implements a setter that allows to use that value with an external method or a lambda More...
 
static TweenerCore< Vector3,
Vector3[], Vector3ArrayOptions > 
Punch (DOGetter< Vector3 > getter, DOSetter< Vector3 > setter, Vector3 direction, float duration, int vibrato=10, float elasticity=1)
 Punches a Vector3 towards the given direction and then back to the starting one as if it was connected to the starting position via an elastic. More...
 
static TweenerCore< Vector3,
Vector3[], Vector3ArrayOptions > 
Shake (DOGetter< Vector3 > getter, DOSetter< Vector3 > setter, float duration, float strength=3, int vibrato=10, float randomness=90, bool ignoreZAxis=true)
 Shakes a Vector3 with the given values. More...
 
static TweenerCore< Vector3,
Vector3[], Vector3ArrayOptions > 
ToArray (DOGetter< Vector3 > getter, DOSetter< Vector3 > setter, Vector3[] endValues, float[] durations)
 Tweens a property or field to the given values using default plugins. Ease is applied between each segment and not as a whole. More...
 
static Sequence Sequence ()
 Returns a new Sequence to be used for tween groups More...
 
static int Complete ()
 Completes all tweens and returns the number of actual tweens completed (meaning tweens that don't have infinite loops and were not already complete) More...
 
static int Complete (object targetOrId)
 Completes all tweens with the given ID or target and returns the number of actual tweens completed (meaning the tweens that don't have infinite loops and were not already complete) More...
 
static int Flip ()
 Flips all tweens (changing their direction to forward if it was backwards and viceversa), then returns the number of actual tweens flipped More...
 
static int Flip (object targetOrId)
 Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), then returns the number of actual tweens flipped More...
 
static int Goto (float to, bool andPlay=false)
 Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved More...
 
static int Goto (object targetOrId, float to, bool andPlay=false)
 Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) and returns the actual tweens involved More...
 
static int Kill ()
 Kills all tweens and returns the number of actual tweens killed More...
 
static int Kill (object targetOrId)
 Kills all tweens with the given ID or target and returns the number of actual tweens killed More...
 
static int Pause ()
 Pauses all tweens and returns the number of actual tweens paused More...
 
static int Pause (object targetOrId)
 Pauses all tweens with the given ID or target and returns the number of actual tweens paused (meaning the tweens that were actually playing and have been paused) More...
 
static int Play ()
 Plays all tweens and returns the number of actual tweens played (meaning tweens that were not already playing or complete) More...
 
static int Play (object targetOrId)
 Plays all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already playing or complete) More...
 
static int PlayBackwards ()
 Plays backwards all tweens and returns the number of actual tweens played (meaning tweens that were not already started, playing backwards or rewinded) More...
 
static int PlayBackwards (object targetOrId)
 Plays backwards all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already started, playing backwards or rewinded) More...
 
static int PlayForward ()
 Plays forward all tweens and returns the number of actual tweens played (meaning tweens that were not already playing forward or complete) More...
 
static int PlayForward (object targetOrId)
 Plays forward all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already playing forward or complete) More...
 
static int Restart (bool includeDelay=true)
 Restarts all tweens, then returns the number of actual tweens restarted More...
 
static int Restart (object targetOrId, bool includeDelay=true)
 Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted More...
 
static int Rewind (bool includeDelay=true)
 Rewinds and pauses all tweens, then returns the number of actual tweens rewinded (meaning tweens that were not already rewinded) More...
 
static int Rewind (object targetOrId, bool includeDelay=true)
 Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded (meaning the tweens that were not already rewinded) More...
 
static int TogglePause ()
 Toggles the play state of all tweens and returns the number of actual tweens toggled (meaning tweens that could be played or paused, depending on the toggle state) More...
 
static int TogglePause (object targetOrId)
 Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled (meaning the tweens that could be played or paused, depending on the toggle state) More...
 
static bool IsTweening (object targetOrId)
 Returns TRUE if a tween with the given ID or target is active (regardless if it's playing or not). More...
 
static int TotPlayingTweens ()
 Returns the total number of active and playing tweens. A tween is considered as playing even if its delay is actually playing More...
 

Static Public Attributes

static readonly string Version = "0.8.530"
 DOTween's version More...
 
static bool useSafeMode = true
 If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things (like targets becoming null while a tween is playing) More...
 
static bool showUnityEditorReport = false
 If TRUE you will get a DOTween report when exiting play mode (only in the Editor). Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. Beware, this will slightly slow down your tweens while inside Unity Editor. More...
 
static float timeScale = 1
 Global DOTween timeScale More...
 
static AutoPlay defaultAutoPlay = AutoPlay.All
 Default autoPlay behaviour for new tweens More...
 
static bool defaultAutoKill = true
 Default autoKillOnComplete behaviour for new tweens More...
 
static LoopType defaultLoopType = LoopType.Restart
 Default loopType applied to all new tweens More...
 
static bool defaultRecyclable
 If TRUE all newly created tweens are set as recyclable, otherwise not More...
 
static Ease defaultEaseType = Ease.InOutQuad
 Default ease applied to all new tweens More...
 
static float defaultEaseOvershootOrAmplitude = 1.70158f
 Default overshoot/amplitude used for eases More...
 
static float defaultEasePeriod = 0
 Default period used for eases More...
 

Properties

static LogBehaviour logBehaviour [get, set]
 DOTween's log behaviour More...
 

Detailed Description

Main DOTween class. Contains static methods to create and control tweens in a generic way

Member Function Documentation

static void Clear ( bool  destroy = false)
static

Kills all tweens, clears all cached tween pools and plugins and resets the max Tweeners/Sequences capacities to the default values.

Parameters
destroyIf TRUE also destroys DOTween's gameObject and resets its initializiation, default settings and everything else (so that next time you use it it will need to be re-initialized)
static void ClearCachedTweens ( )
static

Clears all cached tween pools.

static int Complete ( )
static

Completes all tweens and returns the number of actual tweens completed (meaning tweens that don't have infinite loops and were not already complete)

static int Complete ( object  targetOrId)
static

Completes all tweens with the given ID or target and returns the number of actual tweens completed (meaning the tweens that don't have infinite loops and were not already complete)

static int Flip ( )
static

Flips all tweens (changing their direction to forward if it was backwards and viceversa), then returns the number of actual tweens flipped

static int Flip ( object  targetOrId)
static

Flips the tweens with the given ID or target (changing their direction to forward if it was backwards and viceversa), then returns the number of actual tweens flipped

static int Goto ( float  to,
bool  andPlay = false 
)
static

Sends all tweens to the given position (calculating also eventual loop cycles) and returns the actual tweens involved

static int Goto ( object  targetOrId,
float  to,
bool  andPlay = false 
)
static

Sends all tweens with the given ID or target to the given position (calculating also eventual loop cycles) and returns the actual tweens involved

static IDOTweenInit Init ( bool  recycleAllByDefault = false,
bool  useSafeMode = true,
LogBehaviour  logBehaviour = LogBehaviour.ErrorsOnly 
)
static

Must be called once, before the first ever DOTween call/reference, otherwise it will be called automatically and will use default options. Calling it a second time won't have any effect.

You can chain SetCapacity to this method, to directly set the max starting size of Tweeners and Sequences:

DOTween.Init(false, false, LogBehaviour.Default).SetCapacity(100, 20);

Parameters
recycleAllByDefaultIf TRUE all new tweens will be set for recycling, meaning that when killed, instead of being destroyed, they will be put in a pool and reused instead of creating new tweens. This option allows you to avoid GC allocations by reusing tweens, but you will have to take care of tween references, since they might result active even if they were killed (since they might have been respawned and are now being used for other tweens).

If you want to automatically set your tween references to NULL when a tween is killed you can use the OnKill callback like this:

.OnKill(()=> myTweenReference = null)

You can change this setting at any time by changing the static DOTween.defaultRecyclable property, or you can set the recycling behaviour for each tween separately, using:

SetRecyclable(bool recyclable)

Default: FALSE

Parameters
useSafeModeIf TRUE makes tweens slightly slower but safer, automatically taking care of a series of things (like targets becoming null while a tween is playing). You can change this setting at any time by changing the static DOTween.useSafeMode property.

Default: FALSE

Parameters
logBehaviourType of logging to use. You can change this setting at any time by changing the static DOTween.logBehaviour property.

Default: ErrorsOnly

static bool IsTweening ( object  targetOrId)
static

Returns TRUE if a tween with the given ID or target is active (regardless if it's playing or not).

You can also use this to know if a shortcut tween is active for a given target.

Example:

transform.DOMoveX(45, 1); // transform is automatically added as the tween target

DOTween.IsTweening(transform); // Returns true

static int Kill ( )
static

Kills all tweens and returns the number of actual tweens killed

static int Kill ( object  targetOrId)
static

Kills all tweens with the given ID or target and returns the number of actual tweens killed

static int Pause ( )
static

Pauses all tweens and returns the number of actual tweens paused

static int Pause ( object  targetOrId)
static

Pauses all tweens with the given ID or target and returns the number of actual tweens paused (meaning the tweens that were actually playing and have been paused)

static int Play ( )
static

Plays all tweens and returns the number of actual tweens played (meaning tweens that were not already playing or complete)

static int Play ( object  targetOrId)
static

Plays all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already playing or complete)

static int PlayBackwards ( )
static

Plays backwards all tweens and returns the number of actual tweens played (meaning tweens that were not already started, playing backwards or rewinded)

static int PlayBackwards ( object  targetOrId)
static

Plays backwards all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already started, playing backwards or rewinded)

static int PlayForward ( )
static

Plays forward all tweens and returns the number of actual tweens played (meaning tweens that were not already playing forward or complete)

static int PlayForward ( object  targetOrId)
static

Plays forward all tweens with the given ID or target and returns the number of actual tweens played (meaning the tweens that were not already playing forward or complete)

static TweenerCore<Vector3, Vector3[], Vector3ArrayOptions> Punch ( DOGetter< Vector3 >  getter,
DOSetter< Vector3 >  setter,
Vector3  direction,
float  duration,
int  vibrato = 10,
float  elasticity = 1 
)
static

Punches a Vector3 towards the given direction and then back to the starting one as if it was connected to the starting position via an elastic.

This tween type generates some GC allocations at startup

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
directionThe direction and strength of the punch
durationThe duration of the tween
vibratoIndicates how much will the punch vibrate
elasticityRepresents how much (0 to 1) the vector will go beyond the starting position when bouncing backwards. 1 creates a full oscillation between the direction and the opposite decaying direction, while 0 oscillates only between the starting position and the decaying direction
static int Restart ( bool  includeDelay = true)
static

Restarts all tweens, then returns the number of actual tweens restarted

static int Restart ( object  targetOrId,
bool  includeDelay = true 
)
static

Restarts all tweens with the given ID or target, then returns the number of actual tweens restarted

static int Rewind ( bool  includeDelay = true)
static

Rewinds and pauses all tweens, then returns the number of actual tweens rewinded (meaning tweens that were not already rewinded)

static int Rewind ( object  targetOrId,
bool  includeDelay = true 
)
static

Rewinds and pauses all tweens with the given ID or target, then returns the number of actual tweens rewinded (meaning the tweens that were not already rewinded)

static Sequence Sequence ( )
static

Returns a new Sequence to be used for tween groups

static void SetTweensCapacity ( int  tweenersCapacity,
int  sequencesCapacity 
)
static

Directly sets the current max capacity of Tweeners and Sequences (meaning how many Tweeners and Sequences can be running at the same time), so that DOTween doesn't need to automatically increase them in case the max is reached (which might lead to hiccups when that happens). Sequences capacity must be less or equal to Tweeners capacity (if you pass a low Tweener capacity it will be automatically increased to match the Sequence's). Beware: use this method only when there are no tweens running.

Parameters
tweenersCapacityMax Tweeners capacity. Default: 200
sequencesCapacityMax Sequences capacity. Default: 50
static TweenerCore<Vector3, Vector3[], Vector3ArrayOptions> Shake ( DOGetter< Vector3 >  getter,
DOSetter< Vector3 >  setter,
float  duration,
float  strength = 3,
int  vibrato = 10,
float  randomness = 90,
bool  ignoreZAxis = true 
)
static

Shakes a Vector3 with the given values.

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
durationThe duration of the tween
strengthThe shake strength
vibratoIndicates how much will the shake vibrate
randomnessIndicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). Setting it to 0 will shake along a single direction and behave like a random punch.
ignoreZAxisIf TRUE only shakes on the X Y axis (looks better with things like cameras).
static TweenerCore<float, float, FloatOptions> To ( DOGetter< float >  getter,
DOSetter< float >  setter,
float  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static Tweener To ( DOGetter< int >  getter,
DOSetter< int >  setter,
int  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static Tweener To ( DOGetter< uint >  getter,
DOSetter< uint >  setter,
uint  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<string, string, StringOptions> To ( DOGetter< string >  getter,
DOSetter< string >  setter,
string  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Vector2, Vector2, VectorOptions> To ( DOGetter< Vector2 >  getter,
DOSetter< Vector2 >  setter,
Vector2  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Vector3, Vector3, VectorOptions> To ( DOGetter< Vector3 >  getter,
DOSetter< Vector3 >  setter,
Vector3  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Vector4, Vector4, VectorOptions> To ( DOGetter< Vector4 >  getter,
DOSetter< Vector4 >  setter,
Vector4  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Quaternion, Vector3, QuaternionOptions> To ( DOGetter< Quaternion >  getter,
DOSetter< Quaternion >  setter,
Vector3  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Color, Color, ColorOptions> To ( DOGetter< Color >  getter,
DOSetter< Color >  setter,
Color  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Rect, Rect, RectOptions> To ( DOGetter< Rect >  getter,
DOSetter< Rect >  setter,
Rect  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static Tweener To ( DOGetter< RectOffset >  getter,
DOSetter< RectOffset >  setter,
RectOffset  endValue,
float  duration 
)
static

Tweens a property or field to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static Tweener To ( DOSetter< float >  setter,
float  startValue,
float  endValue,
float  duration 
)
static

Tweens a virtual property from the given start to the given end value and implements a setter that allows to use that value with an external method or a lambda

Example:

To(MyMethod, 0, 12, 0.5f);

Where MyMethod is a function that accepts a float parameter (which will be the result of the virtual tween)

Parameters
setterThe action to perform with the tweened value
startValueThe value to start from
endValueThe end value to reach
durationThe duration of the virtual tween
static TweenerCore<T1, T2, TPlugOptions> To< T1, T2, TPlugOptions > ( ABSTweenPlugin< T1, T2, TPlugOptions >  plugin,
DOGetter< T1 >  getter,
DOSetter< T1 >  setter,
T2  endValue,
float  duration 
)
static

Tweens a property or field to the given value using a custom plugin

Parameters
pluginThe plugin to use. Each custom plugin implements a static Get() method you'll need to call to assign the correct plugin in the correct way, like this:

CustomPlugin.Get()

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
Type Constraints
TPlugOptions :struct 
static Tweener ToAlpha ( DOGetter< Color >  getter,
DOSetter< Color >  setter,
float  endValue,
float  duration 
)
static

Tweens only the alpha of a Color to the given value using default plugins

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
static TweenerCore<Vector3, Vector3[], Vector3ArrayOptions> ToArray ( DOGetter< Vector3 >  getter,
DOSetter< Vector3 >  setter,
Vector3[]  endValues,
float[]  durations 
)
static

Tweens a property or field to the given values using default plugins. Ease is applied between each segment and not as a whole.

This tween type generates some GC allocations at startup

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValuesThe end values to reach for each segment. This array must have the same length as durations
durationsThe duration of each segment. This array must have the same length as endValues
static TweenerCore<Vector3, Vector3, VectorOptions> ToAxis ( DOGetter< Vector3 >  getter,
DOSetter< Vector3 >  setter,
float  endValue,
float  duration,
AxisConstraint  axisConstraint = AxisConstraint.X 
)
static

Tweens only one axis of a Vector3 to the given value using default plugins.

Parameters
getterA getter for the field or property to tween.

Example usage with lambda:

()=> myProperty

Parameters
setterA setter for the field or property to tween

Example usage with lambda:

x=> myProperty = x

Parameters
endValueThe end value to reach
durationThe tween's duration
axisConstraintThe axis to tween
static int TogglePause ( )
static

Toggles the play state of all tweens and returns the number of actual tweens toggled (meaning tweens that could be played or paused, depending on the toggle state)

static int TogglePause ( object  targetOrId)
static

Toggles the play state of all tweens with the given ID or target and returns the number of actual tweens toggled (meaning the tweens that could be played or paused, depending on the toggle state)

static int TotPlayingTweens ( )
static

Returns the total number of active and playing tweens. A tween is considered as playing even if its delay is actually playing

Member Data Documentation

bool defaultAutoKill = true
static

Default autoKillOnComplete behaviour for new tweens

AutoPlay defaultAutoPlay = AutoPlay.All
static

Default autoPlay behaviour for new tweens

float defaultEaseOvershootOrAmplitude = 1.70158f
static

Default overshoot/amplitude used for eases

Default: 1.70158f

float defaultEasePeriod = 0
static

Default period used for eases

Default: 0

Ease defaultEaseType = Ease.InOutQuad
static

Default ease applied to all new tweens

LoopType defaultLoopType = LoopType.Restart
static

Default loopType applied to all new tweens

bool defaultRecyclable
static

If TRUE all newly created tweens are set as recyclable, otherwise not

bool showUnityEditorReport = false
static

If TRUE you will get a DOTween report when exiting play mode (only in the Editor). Useful to know how many max Tweeners and Sequences you reached and optimize your final project accordingly. Beware, this will slightly slow down your tweens while inside Unity Editor.

Default: FALSE

float timeScale = 1
static

Global DOTween timeScale

bool useSafeMode = true
static

If TRUE (default) makes tweens slightly slower but safer, automatically taking care of a series of things (like targets becoming null while a tween is playing)

readonly string Version = "0.8.530"
static

DOTween's version

Property Documentation

LogBehaviour logBehaviour
staticgetset

DOTween's log behaviour