diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML index 4ff28a0..ff0ffef 100644 --- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML @@ -676,9 +676,16 @@ If TRUE includes the eventual tween delay, otherwise skips it - Rewinds the tween + Rewinds and pauses the tween If TRUE includes the eventual tween delay, otherwise skips it + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + Plays the tween if it was paused, pauses it if it was playing @@ -1443,6 +1450,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference @@ -1892,6 +1906,20 @@ 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) + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + 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) diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll index fd8e44c..e386455 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb index e93687f..e7f0477 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll index 4ed813f..1b851d2 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1883ccc..72ebcb2 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll index 193ca8d..1af7968 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 93ca0fa..6f07d45 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll index 8019725..8d6c946 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb index cccdcbf..be71ea4 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.xml b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.xml index 5c9ddd3..62e510d 100644 --- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.xml +++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.xml @@ -92,6 +92,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index 6c8e4e6..f488c19 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 3302019..4d02eab 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML index 4ff28a0..ff0ffef 100644 --- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML @@ -676,9 +676,16 @@ If TRUE includes the eventual tween delay, otherwise skips it - Rewinds the tween + Rewinds and pauses the tween If TRUE includes the eventual tween delay, otherwise skips it + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + Plays the tween if it was paused, pauses it if it was playing @@ -1443,6 +1450,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference @@ -1892,6 +1906,20 @@ 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) + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + 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) diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll index fd8e44c..e386455 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb index e93687f..e7f0477 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll index 4ed813f..1b851d2 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1883ccc..72ebcb2 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll index 193ca8d..1af7968 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 93ca0fa..6f07d45 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll index 8019725..8d6c946 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb index cccdcbf..be71ea4 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.xml b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.xml index 5c9ddd3..62e510d 100644 --- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.xml +++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.xml @@ -92,6 +92,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index 6c8e4e6..f488c19 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 3302019..4d02eab 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML index 4ff28a0..ff0ffef 100644 --- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML +++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML @@ -676,9 +676,16 @@ If TRUE includes the eventual tween delay, otherwise skips it - Rewinds the tween + Rewinds and pauses the tween If TRUE includes the eventual tween delay, otherwise skips it + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + Plays the tween if it was paused, pauses it if it was playing @@ -1443,6 +1450,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference @@ -1892,6 +1906,20 @@ 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) + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + 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) diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll index fd8e44c..e386455 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb index e93687f..e7f0477 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll index 4ed813f..1b851d2 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1883ccc..72ebcb2 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll index 193ca8d..1af7968 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 93ca0fa..6f07d45 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll index 8019725..8d6c946 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb index cccdcbf..be71ea4 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.xml b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.xml index 5c9ddd3..62e510d 100644 --- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.xml +++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.xml @@ -92,6 +92,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index 6c8e4e6..f488c19 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 3302019..4d02eab 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll index 32ac3f0..6aaa728 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll and b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.mdb index 4da3317..a0b2311 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset b/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset index b63c859..dce9c7a 100644 Binary files a/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset and b/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset differ diff --git a/UnityTests.Unity5/Assets/_Examples.meta b/UnityTests.Unity5/Assets/_DOTween Examples.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples.meta rename to UnityTests.Unity5/Assets/_DOTween Examples.meta diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimation.unity b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimation.unity similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimation.unity rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimation.unity diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimation.unity.meta b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimation.unity.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimation.unity.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimation.unity.meta diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.cs b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.cs similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.cs rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.cs diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.cs.meta b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.cs.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.cs.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.cs.meta diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.unity b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.unity similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.unity rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.unity diff --git a/UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.unity.meta b/UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.unity.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/DOTweenAnimationSequence_RewindAndPlay.unity.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/DOTweenAnimationSequence_RewindAndPlay.unity.meta diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs new file mode 100644 index 0000000..5108dde --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using System.Collections; +using DG.Tweening; + +public class FadeActive : MonoBehaviour +{ + public SpriteRenderer[] fadeTargets; + Sequence fadeTween; + + void Start() + { + fadeTween = DOTween.Sequence().SetAutoKill(false).Pause(); + foreach (SpriteRenderer r in fadeTargets) fadeTween.Append(r.DOFade(0, 1)); + fadeTween.OnComplete(()=> { + foreach (SpriteRenderer r in fadeTargets) r.gameObject.SetActive(false); + }); + } + + public void FadeOut() + { + fadeTween.PlayForward(); + } + + public void FadeIn() + { + foreach (SpriteRenderer r in fadeTargets) r.gameObject.SetActive(true); + fadeTween.PlayBackwards(); + } +} \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs.meta b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs.meta new file mode 100644 index 0000000..a55eda4 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0bdadf194ef79a341b3ab40a750ce7a3 +timeCreated: 1433095869 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity new file mode 100644 index 0000000..68995a2 Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity differ diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity.meta b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity.meta new file mode 100644 index 0000000..95769e0 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/FadeActive.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a115d6ceab834ce4194b0cbbb8cd6724 +timeCreated: 1433095862 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.cs b/UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.cs similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.cs rename to UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.cs diff --git a/UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.cs.meta b/UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.cs.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.cs.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.cs.meta diff --git a/UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.unity b/UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.unity similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.unity rename to UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.unity diff --git a/UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.unity.meta b/UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.unity.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/FollowCamTopDown.unity.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/FollowCamTopDown.unity.meta diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs new file mode 100644 index 0000000..76b1abd --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using System.Collections; +using DG.Tweening; + +public class InfinitePulseAndSmoothHover : MonoBehaviour +{ + Tween pulseTween; + + void Start() + { + // Create the pulse tween and pause it + pulseTween = this.transform.DOScale(1.3f, 0.5f) + .SetEase(Ease.InOutQuad) + .SetLoops(-1, LoopType.Yoyo) + .Pause(); + } + + void OnMouseEnter() + { + // Just play forward + pulseTween.PlayForward(); + } + + void OnMouseExit() + { + // Find the current elapsed duration without considering loops, + // then goto it and play the tween backwards. + // I'm gonna use ElapsedDirectionalPercentage instead of Elapsed, + // because I want Yoyo loops to be considered correctly inverted as they are + // pulseTween.Goto(pulseTween.ElapsedDirectionalPercentage() * pulseTween.Duration(false)); + // pulseTween.PlayBackwards(); + + // That said, I just added a SmoothRewind method so you can use that :P + pulseTween.SmoothRewind(); + } +} \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs.meta b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs.meta new file mode 100644 index 0000000..d7d48b4 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cc3c938e60e99be4f85f713e011ffa41 +timeCreated: 1433260532 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity new file mode 100644 index 0000000..c1ca35b Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity differ diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity.meta b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity.meta new file mode 100644 index 0000000..a42f4c4 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/InfinitePulseAndSmoothHover.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 46905253108a53046805065f19cff1ba +timeCreated: 1433260432 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Examples/MAT Blue.mat b/UnityTests.Unity5/Assets/_DOTween Examples/MAT Blue.mat similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/MAT Blue.mat rename to UnityTests.Unity5/Assets/_DOTween Examples/MAT Blue.mat diff --git a/UnityTests.Unity5/Assets/_Examples/MAT Blue.mat.meta b/UnityTests.Unity5/Assets/_DOTween Examples/MAT Blue.mat.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/MAT Blue.mat.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/MAT Blue.mat.meta diff --git a/UnityTests.Unity5/Assets/_Examples/MAT Ground.mat b/UnityTests.Unity5/Assets/_DOTween Examples/MAT Ground.mat similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/MAT Ground.mat rename to UnityTests.Unity5/Assets/_DOTween Examples/MAT Ground.mat diff --git a/UnityTests.Unity5/Assets/_Examples/MAT Ground.mat.meta b/UnityTests.Unity5/Assets/_DOTween Examples/MAT Ground.mat.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/MAT Ground.mat.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/MAT Ground.mat.meta diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png b/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png new file mode 100644 index 0000000..d7e7870 Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png differ diff --git a/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png.meta b/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png.meta new file mode 100644 index 0000000..aebfac6 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Examples/Spaceship.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 48a2d12d750f2db42a41f7bdc0935848 +timeCreated: 1433096829 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Examples/TEX Ground.jpg b/UnityTests.Unity5/Assets/_DOTween Examples/TEX Ground.jpg similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/TEX Ground.jpg rename to UnityTests.Unity5/Assets/_DOTween Examples/TEX Ground.jpg diff --git a/UnityTests.Unity5/Assets/_Examples/TEX Ground.jpg.meta b/UnityTests.Unity5/Assets/_DOTween Examples/TEX Ground.jpg.meta similarity index 100% rename from UnityTests.Unity5/Assets/_Examples/TEX Ground.jpg.meta rename to UnityTests.Unity5/Assets/_DOTween Examples/TEX Ground.jpg.meta diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples.meta b/UnityTests.Unity5/Assets/_DOTween Pro Examples.meta new file mode 100644 index 0000000..05378da --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Pro Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9768ed5098c764340993b77c5041f760 +folderAsset: yes +timeCreated: 1433154581 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat new file mode 100644 index 0000000..d004d60 Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat differ diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat.meta b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat.meta new file mode 100644 index 0000000..023a47f --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword A.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21910083fa7ddb9418b1f325411856be +timeCreated: 1433157219 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat new file mode 100644 index 0000000..331f9d3 Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat differ diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat.meta b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat.meta new file mode 100644 index 0000000..d8f8bc8 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Pro Examples/MAT Sword B.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9c1c8b84aaadd843ab6ebf98bdd8b71 +timeCreated: 1433157312 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity b/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity new file mode 100644 index 0000000..cecbc1a Binary files /dev/null and b/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity differ diff --git a/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity.meta b/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity.meta new file mode 100644 index 0000000..e3adcf7 --- /dev/null +++ b/UnityTests.Unity5/Assets/_DOTween Pro Examples/_ObjectShowcase.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 908059918c3382a4fa594291928bae25 +timeCreated: 1433154602 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity b/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity index 1e23278..43eae62 100644 Binary files a/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity and b/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity differ diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.cs b/UnityTests.Unity5/Assets/_Tests/TempTests.cs index 3f7c038..b827de8 100644 --- a/UnityTests.Unity5/Assets/_Tests/TempTests.cs +++ b/UnityTests.Unity5/Assets/_Tests/TempTests.cs @@ -7,40 +7,27 @@ using DG.Tweening.Core; using UnityEngine; using UnityEngine.UI; -public class TempTests : BrainBase +public class TempTests : MonoBehaviour { - public Transform targetA, targetB; + Sequence sequence; - public DOGetter getterA, getterB; - - IEnumerator Start() + void Start() { - yield return new WaitForSeconds(1); + sequence = DOTween.Sequence(); + sequence.AppendInterval(3); + sequence.AppendCallback(() => { + this.transform.GetComponent().enabled = !this.transform.GetComponent().enabled; + }); - getterA = ()=> targetA.position; - getterB = ()=> targetB.position; - - Debug.Log(getterA == getterB); - Debug.Log(getterA.Equals(getterB)); - - float time = Time.realtimeSinceStartup; - Debug.Log(CompareGetters(getterA, getterB)); - float elapsed = Time.realtimeSinceStartup - time; - Debug.Log("Compare executed in " + elapsed + " seconds"); + sequence.SetLoops(-1, LoopType.Restart); + sequence.Play(); } - bool CompareGetters(DOGetter a, DOGetter b) - { - var aBody = a.Method.GetMethodBody().GetILAsByteArray(); - var bBody = b.Method.GetMethodBody().GetILAsByteArray(); - - int aLen = aBody.Length; - Debug.Log("LEN: " + aLen); - if (aLen != bBody.Length) return false; - - for(int i = 0; i < aLen; i++) { - if(aBody[i] != bBody[i]) return false; - } - return true; - } + void OnDestroy() + { + if (sequence != null) { + Debug.Log("Killing Sequence"); + sequence.Kill(); + } + } } \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.unity b/UnityTests.Unity5/Assets/_Tests/TempTests.unity index 0d4bf48..09a8e64 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/TempTests.unity and b/UnityTests.Unity5/Assets/_Tests/TempTests.unity differ diff --git a/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset b/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset index 9c6420b..b8fcdae 100644 Binary files a/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset and b/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset differ diff --git a/_DOTween.Assembly/DOTween/Core/Enums/OperationType.cs b/_DOTween.Assembly/DOTween/Core/Enums/OperationType.cs index c0277c0..0923a81 100644 --- a/_DOTween.Assembly/DOTween/Core/Enums/OperationType.cs +++ b/_DOTween.Assembly/DOTween/Core/Enums/OperationType.cs @@ -17,6 +17,7 @@ namespace DG.Tweening.Core.Enums PlayForward, PlayBackwards, Rewind, + SmoothRewind, Restart, TogglePause, IsTweening diff --git a/_DOTween.Assembly/DOTween/Core/TweenManager.cs b/_DOTween.Assembly/DOTween/Core/TweenManager.cs index 423f942..7741b7d 100644 --- a/_DOTween.Assembly/DOTween/Core/TweenManager.cs +++ b/_DOTween.Assembly/DOTween/Core/TweenManager.cs @@ -474,6 +474,9 @@ namespace DG.Tweening.Core case OperationType.Rewind: if (Rewind(t, optionalBool)) totInvolved++; break; + case OperationType.SmoothRewind: + if (SmoothRewind(t)) totInvolved++; + break; case OperationType.TogglePause: if (TogglePause(t)) totInvolved++; break; @@ -634,6 +637,25 @@ namespace DG.Tweening.Core return rewinded; } + internal static bool SmoothRewind(Tween t) + { + bool rewinded = false; + if (t.delay > 0) { + rewinded = t.elapsedDelay < t.delay; + t.elapsedDelay = t.delay; + t.delayComplete = true; + } + if (t.position > 0 || t.completedLoops > 0 || !t.startupDone) { + rewinded = true; + if (t.loopType == LoopType.Incremental) t.PlayBackwards(); + else { + t.Goto(t.ElapsedDirectionalPercentage() * t.duration); + t.PlayBackwards(); + } + } else t.isPlaying = false; + return rewinded; + } + internal static bool TogglePause(Tween t) { if (t.isPlaying) return Pause(t); diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs index 1c6821a..09390b0 100644 --- a/_DOTween.Assembly/DOTween/DOTween.cs +++ b/_DOTween.Assembly/DOTween/DOTween.cs @@ -32,7 +32,7 @@ namespace DG.Tweening public class DOTween { /// DOTween's version - public static readonly string Version = "1.0.765"; + public static readonly string Version = "1.0.770"; /////////////////////////////////////////////// // Options //////////////////////////////////// @@ -791,6 +791,26 @@ namespace DG.Tweening return TweenManager.FilteredOperation(OperationType.Rewind, FilterType.TargetOrId, targetOrId, includeDelay, 0); } + /// Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + /// (meaning tweens that were not already rewinded). + /// A "smooth rewind" animates the tween to its start position, + /// skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + /// Note that a tween that was smoothly rewinded will have its play direction flipped + public static int SmoothRewindAll() + { + return TweenManager.FilteredOperation(OperationType.SmoothRewind, FilterType.All, null, false, 0); + } + /// Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + /// (meaning the tweens that were not already rewinded). + /// A "smooth rewind" animates the tween to its start position, + /// skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + /// Note that a tween that was smoothly rewinded will have its play direction flipped + public static int SmoothRewind(object targetOrId) + { + if (targetOrId == null) return 0; + return TweenManager.FilteredOperation(OperationType.SmoothRewind, FilterType.TargetOrId, targetOrId, false, 0); + } + /// 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) public static int TogglePauseAll() diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs index 09bffd7..87e45f2 100644 --- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs +++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs @@ -1215,6 +1215,16 @@ namespace DG.Tweening return DOTween.Rewind(target, includeDelay); } + /// + /// Smoothly rewinds all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens rewinded. + /// + public static int DOSmoothRewind(this Component target) + { + return DOTween.SmoothRewind(target); + } + /// /// Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference /// (meaning tweens that were started from this target, or that had this target added as an Id) diff --git a/_DOTween.Assembly/DOTween/TweenExtensions.cs b/_DOTween.Assembly/DOTween/TweenExtensions.cs index 7c47dc7..25e35a7 100644 --- a/_DOTween.Assembly/DOTween/TweenExtensions.cs +++ b/_DOTween.Assembly/DOTween/TweenExtensions.cs @@ -179,7 +179,7 @@ namespace DG.Tweening TweenManager.Restart(t, includeDelay); } - /// Rewinds the tween + /// Rewinds and pauses the tween /// If TRUE includes the eventual tween delay, otherwise skips it public static void Rewind(this Tween t, bool includeDelay = true) { @@ -194,6 +194,24 @@ namespace DG.Tweening TweenManager.Rewind(t, includeDelay); } + /// Smoothly rewinds the tween (delays excluded). + /// A "smooth rewind" animates the tween to its start position, + /// skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + /// If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + /// Note that a tween that was smoothly rewinded will have its play direction flipped + public static void SmoothRewind(this Tween t) + { + if (t == null) { + if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return; + } else if (!t.active) { + if (Debugger.logPriority > 1) Debugger.LogInvalidTween(t); return; + } else if (t.isSequenced) { + if (Debugger.logPriority > 1) Debugger.LogNestedTween(t); return; + } + + TweenManager.SmoothRewind(t); + } + /// Plays the tween if it was paused, pauses it if it was playing public static void TogglePause(this Tween t) { diff --git a/_DOTween.Assembly/DOTween50/ShortcutExtensions50.cs b/_DOTween.Assembly/DOTween50/ShortcutExtensions50.cs index caff908..8a3d5be 100644 --- a/_DOTween.Assembly/DOTween50/ShortcutExtensions50.cs +++ b/_DOTween.Assembly/DOTween50/ShortcutExtensions50.cs @@ -126,7 +126,7 @@ namespace DG.Tweening /// public static int DORestart(this AudioMixer target) { - return DOTween.RestartAll(target); + return DOTween.Restart(target); } /// @@ -136,7 +136,17 @@ namespace DG.Tweening /// public static int DORewind(this AudioMixer target) { - return DOTween.RewindAll(target); + return DOTween.Rewind(target); + } + + /// + /// Smoothly rewinds all tweens that have this target as a reference + /// (meaning tweens that were started from this target, or that had this target added as an Id) + /// and returns the total number of tweens rewinded. + /// + public static int DOSmoothRewind(this AudioMixer target) + { + return DOTween.SmoothRewind(target); } /// diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML index 4ff28a0..ff0ffef 100644 --- a/_DOTween.Assembly/bin/DOTween.XML +++ b/_DOTween.Assembly/bin/DOTween.XML @@ -676,9 +676,16 @@ If TRUE includes the eventual tween delay, otherwise skips it - Rewinds the tween + Rewinds and pauses the tween If TRUE includes the eventual tween delay, otherwise skips it + + Smoothly rewinds the tween (delays excluded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + If called on a tween who is still waiting for its delay to happen, it will simply set the delay to 0 and pause the tween. + Note that a tween that was smoothly rewinded will have its play direction flipped + Plays the tween if it was paused, pauses it if it was playing @@ -1443,6 +1450,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference @@ -1892,6 +1906,20 @@ 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) + + Smoothly rewinds all tweens (delays excluded), then returns the number of actual tweens rewinding/rewinded + (meaning tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + + + Smoothly rewinds all tweens (delays excluded) with the given ID or target, then returns the number of actual tweens rewinding/rewinded + (meaning the tweens that were not already rewinded). + A "smooth rewind" animates the tween to its start position, + skipping all elapsed loops (except in case of LoopType.Incremental) while keeping the animation fluent. + Note that a tween that was smoothly rewinded will have its play direction flipped + 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) diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll index fd8e44c..e386455 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb index e93687f..e7f0477 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween43.dll b/_DOTween.Assembly/bin/DOTween43.dll index 4ed813f..1b851d2 100644 Binary files a/_DOTween.Assembly/bin/DOTween43.dll and b/_DOTween.Assembly/bin/DOTween43.dll differ diff --git a/_DOTween.Assembly/bin/DOTween43.dll.mdb b/_DOTween.Assembly/bin/DOTween43.dll.mdb index 1883ccc..72ebcb2 100644 Binary files a/_DOTween.Assembly/bin/DOTween43.dll.mdb and b/_DOTween.Assembly/bin/DOTween43.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween46.dll b/_DOTween.Assembly/bin/DOTween46.dll index 193ca8d..1af7968 100644 Binary files a/_DOTween.Assembly/bin/DOTween46.dll and b/_DOTween.Assembly/bin/DOTween46.dll differ diff --git a/_DOTween.Assembly/bin/DOTween46.dll.mdb b/_DOTween.Assembly/bin/DOTween46.dll.mdb index 93ca0fa..6f07d45 100644 Binary files a/_DOTween.Assembly/bin/DOTween46.dll.mdb and b/_DOTween.Assembly/bin/DOTween46.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween50.dll b/_DOTween.Assembly/bin/DOTween50.dll index 8019725..8d6c946 100644 Binary files a/_DOTween.Assembly/bin/DOTween50.dll and b/_DOTween.Assembly/bin/DOTween50.dll differ diff --git a/_DOTween.Assembly/bin/DOTween50.dll.mdb b/_DOTween.Assembly/bin/DOTween50.dll.mdb index cccdcbf..be71ea4 100644 Binary files a/_DOTween.Assembly/bin/DOTween50.dll.mdb and b/_DOTween.Assembly/bin/DOTween50.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween50.xml b/_DOTween.Assembly/bin/DOTween50.xml index 5c9ddd3..62e510d 100644 --- a/_DOTween.Assembly/bin/DOTween50.xml +++ b/_DOTween.Assembly/bin/DOTween50.xml @@ -92,6 +92,13 @@ and returns the total number of tweens rewinded. + + + Smoothly eewinds all tweens that have this target as a reference + (meaning tweens that were started from this target, or that had this target added as an Id) + and returns the total number of tweens rewinded. + + Toggles the paused state (plays if it was paused, pauses if it was playing) of all tweens that have this target as a reference diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll index 6c8e4e6..f488c19 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb index 3302019..4d02eab 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ