diff --git a/.gitignore b/.gitignore
index f0b7064..83ed7eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,4 +21,5 @@ ExternalPluginsTestsAndExamples*
*.Unity*/Assets/-tk2d*
*.Unity*/Assets/Console*Pro*
*.Unity*/Assets/Text*Mesh*Pro*
-*HOPoolOperator*
\ No newline at end of file
+*HOPoolOperator*
+zz builds
\ No newline at end of file
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
index 33da8e8..8cef664 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
@@ -1183,6 +1183,45 @@
Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints
The color of the path (shown when gizmos are active in the Play panel and the tween is running)
+
+ Tweens a Light's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Light as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's named color property to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween to
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
+
+ Tweens a Material's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Material's named alpha property BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween by
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
Tweens a Transform's position BY the given value (as if you chained a SetRelative),
in a way that allows other DOBlendableMove tweens to work together on the same target,
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
index 4d6377f..af8a899 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 817bcd8..b3c3e2a 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 58ae7f6..dd42544 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 17789d5..999a9c9 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/DOTween43.xml b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.xml
index faa6a44..d571dba 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.xml
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.xml
@@ -43,5 +43,19 @@
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations
The end value to reachThe duration of the tween
+
+ Tweens a SpriteRenderer's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a SpriteRenderer's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll
index 5d1cf36..1e1c79f 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 05b41ca..da08d52 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/DOTween46.xml b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.xml
index f6ff80e..1cce00e 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.xml
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.xml
@@ -118,5 +118,47 @@
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
Leave it to NULL (default) to use default ones
+
+ Tweens a Graphic's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Graphic's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Image's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Image's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Text's color BY the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Text's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll
index 567a0c5..59be210 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 bc50b5e..36263ac 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/Editor/DOTweenEditor.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 718bd84..7d86250 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 b5bc434..e1618ee 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 33da8e8..8cef664 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
@@ -1183,6 +1183,45 @@
Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints
The color of the path (shown when gizmos are active in the Play panel and the tween is running)
+
+ Tweens a Light's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Light as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's named color property to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween to
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
+
+ Tweens a Material's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Material's named alpha property BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween by
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
Tweens a Transform's position BY the given value (as if you chained a SetRelative),
in a way that allows other DOBlendableMove tweens to work together on the same target,
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
index 4d6377f..af8a899 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 817bcd8..b3c3e2a 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 58ae7f6..dd42544 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 17789d5..999a9c9 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/DOTween43.xml b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.xml
index faa6a44..d571dba 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.xml
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.xml
@@ -43,5 +43,19 @@
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations
The end value to reachThe duration of the tween
+
+ Tweens a SpriteRenderer's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a SpriteRenderer's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
index 5d1cf36..1e1c79f 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 05b41ca..da08d52 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/DOTween46.xml b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.xml
index f6ff80e..1cce00e 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.xml
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.xml
@@ -118,5 +118,47 @@
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
Leave it to NULL (default) to use default ones
+
+ Tweens a Graphic's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Graphic's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Image's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Image's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Text's color BY the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Text's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
index 567a0c5..59be210 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 bc50b5e..36263ac 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/Editor/DOTweenEditor.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 718bd84..7d86250 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 b5bc434..e1618ee 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 33da8e8..8cef664 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -1183,6 +1183,45 @@
Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints
The color of the path (shown when gizmos are active in the Play panel and the tween is running)
+
+ Tweens a Light's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Light as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's named color property to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween to
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
+
+ Tweens a Material's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Material's named alpha property BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween by
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
Tweens a Transform's position BY the given value (as if you chained a SetRelative),
in a way that allows other DOBlendableMove tweens to work together on the same target,
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index 4d6377f..af8a899 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 817bcd8..b3c3e2a 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 58ae7f6..dd42544 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 17789d5..999a9c9 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/DOTween43.xml b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.xml
index faa6a44..d571dba 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.xml
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.xml
@@ -43,5 +43,19 @@
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations
The end value to reachThe duration of the tween
+
+ Tweens a SpriteRenderer's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a SpriteRenderer's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
index 5d1cf36..1e1c79f 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 05b41ca..da08d52 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/DOTween46.xml b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.xml
index f6ff80e..1cce00e 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.xml
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.xml
@@ -118,5 +118,47 @@
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
Leave it to NULL (default) to use default ones
+
+ Tweens a Graphic's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Graphic's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Image's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Image's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Text's color BY the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Text's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
index 567a0c5..59be210 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 bc50b5e..36263ac 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/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 718bd84..7d86250 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 b5bc434..e1618ee 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/Resources/DOTweenSettings.asset b/UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset
index 262a713..bbdc025 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/UnityVS/Editor/UnityVS.VersionSpecific.dll b/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll
index a5205cd..aa9d1bb 100644
Binary files a/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll and b/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll differ
diff --git a/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll.meta b/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll.meta
index a3a6d5a..bcc7fff 100644
--- a/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll.meta
+++ b/UnityTests.Unity5/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 42c12149efdc035458bffa42058b9a04
-timeCreated: 1426681070
-licenseType: Pro
+timeCreated: 1429055804
+licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
diff --git a/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity b/UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity
index 0de87ec..ece3b08 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/BlendableTweens.cs b/UnityTests.Unity5/Assets/_Tests/BlendableTweens.cs
index 10727a6..138796c 100644
--- a/UnityTests.Unity5/Assets/_Tests/BlendableTweens.cs
+++ b/UnityTests.Unity5/Assets/_Tests/BlendableTweens.cs
@@ -10,8 +10,11 @@ public class BlendableTweens : BrainBase
public bool repeatBlendable = true;
public RotateMode rotationMode;
public Ease ease = Ease.OutQuad;
- public Transform[] targets;
+ public Color toBlendableColor0, toBlendableColor1;
public Transform nonBlendableT;
+ public Transform[] targets;
+ public Renderer[] renderers;
+ public SpriteRenderer[] sprites;
Vector3[] startPositions;
@@ -23,6 +26,8 @@ public class BlendableTweens : BrainBase
yield return new WaitForSeconds(0.6f);
Vector3 to;
+ Color toCol;
+ float toFloat;
float duration;
int loops;
@@ -70,6 +75,56 @@ public class BlendableTweens : BrainBase
to = new Vector3(0, 90, 0);
if (from) nonBlendableT.DORotate(to, duration, rotationMode).From(true).SetEase(ease).SetAutoKill(false).Pause();
else nonBlendableT.DORotate(to, duration, rotationMode).SetEase(ease).SetAutoKill(false).Pause();
+
+ // Color
+ duration = 3;
+ toCol = toBlendableColor0;
+ if (from) renderers[0].material.DOBlendableColor(toCol, duration).From().SetEase(ease).SetAutoKill(false).Pause();
+ else renderers[0].material.DOBlendableColor(toCol, duration).SetEase(ease).SetAutoKill(false).Pause();
+ if (addBlendable) {
+ toCol = toBlendableColor1;
+ duration = repeatBlendable ? 1 : 3;
+ loops = repeatBlendable ? 3 : 1;
+ if (fromBlendable) renderers[0].material.DOBlendableColor(toCol, duration).From().SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ else renderers[0].material.DOBlendableColor(toCol, duration).SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ }
+
+ duration = 3;
+ toCol = toBlendableColor0;
+ if (from) sprites[0].DOBlendableColor(toCol, duration).From().SetEase(ease).SetAutoKill(false).Pause();
+ else sprites[0].DOBlendableColor(toCol, duration).SetEase(ease).SetAutoKill(false).Pause();
+ if (addBlendable) {
+ toCol = toBlendableColor1;
+ duration = repeatBlendable ? 1 : 3;
+ loops = repeatBlendable ? 3 : 1;
+ if (fromBlendable) sprites[0].DOBlendableColor(toCol, duration).From().SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ else sprites[0].DOBlendableColor(toCol, duration).SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ }
+
+ // Fade
+ duration = 3;
+ toFloat = -1;
+ if (from) renderers[1].material.DOBlendableFadeBy(toFloat, duration).From().SetEase(ease).SetAutoKill(false).Pause();
+ else renderers[1].material.DOBlendableFadeBy(toFloat, duration).SetEase(ease).SetAutoKill(false).Pause();
+ if (addBlendable) {
+ toFloat = 1;
+ duration = repeatBlendable ? 1 : 3;
+ loops = repeatBlendable ? 3 : 1;
+ if (fromBlendable) renderers[1].material.DOBlendableFadeBy(toFloat, duration).From().SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ else renderers[1].material.DOBlendableFadeBy(toFloat, duration).SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ }
+
+ duration = 3;
+ toFloat = -1;
+ if (from) sprites[1].DOBlendableFadeBy(toFloat, duration).From().SetEase(ease).SetAutoKill(false).Pause();
+ else sprites[1].DOBlendableFadeBy(toFloat, duration).SetEase(ease).SetAutoKill(false).Pause();
+ if (addBlendable) {
+ toFloat = 1;
+ duration = repeatBlendable ? 1 : 3;
+ loops = repeatBlendable ? 3 : 1;
+ if (fromBlendable) sprites[1].DOBlendableFadeBy(toFloat, duration).From().SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ else sprites[1].DOBlendableFadeBy(toFloat, duration).SetEase(ease).SetLoops(loops, LoopType.Yoyo).SetAutoKill(false).Pause();
+ }
}
void OnGUI()
diff --git a/UnityTests.Unity5/Assets/_Tests/BlendableTweens.unity b/UnityTests.Unity5/Assets/_Tests/BlendableTweens.unity
index da15a78..a73dae2 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/BlendableTweens.unity and b/UnityTests.Unity5/Assets/_Tests/BlendableTweens.unity differ
diff --git a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
index dc31c89..2968c41 100644
--- a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
+++ b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
@@ -5,18 +5,11 @@ using System.Collections;
public class Temp : BrainBase
{
- public Transform target;
+ public RectTransform t;
IEnumerator Start()
{
- target.DOMoveX(2, 3).OnComplete(()=> {
- Debug.Log("call");
- target.GetComponent().Goco();
- Debug.Log("after call");
- });
-
- yield return new WaitForSeconds(1);
-
- target.gameObject.SetActive(false);
+ yield return new WaitForSeconds(0.6f);
+ DOTween.To(() => t.anchorMin, (x) => t.anchorMin = x, new Vector2(-1,0) , 2.0f).OnComplete(()=>Debug.Log(t.anchorMin.ToString("N16")));
}
}
\ No newline at end of file
diff --git a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity
index 8f8937f..601a247 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity and b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity differ
diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.cs b/UnityTests.Unity5/Assets/_Tests/TempTests.cs
index 27997a8..e08ce39 100644
--- a/UnityTests.Unity5/Assets/_Tests/TempTests.cs
+++ b/UnityTests.Unity5/Assets/_Tests/TempTests.cs
@@ -7,13 +7,8 @@ using System;
public class TempTests : BrainBase
{
- void OnEnable()
+ void OnMouseDown()
{
- Debug.Log("ENABLE");
- }
-
- void OnDisable()
- {
- Debug.Log("DISABLE");
+ this.GetComponent().DOPlay();
}
}
\ No newline at end of file
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Diffuse MAT 00.mat b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Diffuse MAT 00.mat
index 1baef30..f726031 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Diffuse MAT 00.mat and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Diffuse MAT 00.mat differ
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat
new file mode 100644
index 0000000..fb267a5
Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat differ
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat.meta
new file mode 100644
index 0000000..870b3fa
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/Standard MAT.mat.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9c25459fcc7c05a45ae2bac021a83e01
+timeCreated: 1429119523
+licenseType: Free
+NativeFormatImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 00.mat b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 01.mat
similarity index 95%
rename from UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 00.mat
rename to UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 01.mat
index 95f9073..faaf0a0 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 00.mat and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 01.mat differ
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 00.mat.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 01.mat.meta
similarity index 100%
rename from UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 00.mat.meta
rename to UnityTests.Unity5/Assets/_Tests/_Shared Materials/TransparentDiffuse MAT 01.mat.meta
diff --git a/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset b/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset
index e469ea7..9c6420b 100644
Binary files a/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset and b/UnityTests.Unity5/ProjectSettings/EditorBuildSettings.asset differ
diff --git a/UnityTests.Unity5/ProjectSettings/ProjectSettings.asset b/UnityTests.Unity5/ProjectSettings/ProjectSettings.asset
index 9727819..1bf74ea 100644
Binary files a/UnityTests.Unity5/ProjectSettings/ProjectSettings.asset and b/UnityTests.Unity5/ProjectSettings/ProjectSettings.asset differ
diff --git a/UnityTests.Unity5/ProjectSettings/ProjectVersion.txt b/UnityTests.Unity5/ProjectSettings/ProjectVersion.txt
index b0ac510..de77f25 100644
--- a/UnityTests.Unity5/ProjectSettings/ProjectVersion.txt
+++ b/UnityTests.Unity5/ProjectSettings/ProjectVersion.txt
@@ -1,2 +1,2 @@
-m_EditorVersion: 5.0.0f4
+m_EditorVersion: 5.0.1f1
m_StandardAssetsVersion: 0
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.XML b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.XML
index 21d6356..c159e43 100644
--- a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.XML
+++ b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.XML
@@ -532,29 +532,29 @@
Options for float tweens
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector2 tweens
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector2 tweens
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector3 tweens
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector3 tweens
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector4 tweens
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Vector4 tweens
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
@@ -918,6 +918,14 @@
Also stores the material as the tween's target so it can be used for filtered operations
The end value to reachThe duration of the tween
+
+ Tweens a Material's alpha color to the given value
+ (will have no effect unless your material supports transparency).
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
Tweens a Material's named float property to the given value.
Also stores the material as the tween's target so it can be used for filtered operations
@@ -1476,7 +1484,7 @@
Example usage with lambda:x=> myProperty = x
The end value to reachThe tween's duration
-
+
Tweens a property or field to the given value using default plugins
A getter for the field or property to tween.
Example usage with lambda:()=> myProperty
@@ -1484,7 +1492,7 @@
Example usage with lambda:x=> myProperty = x
The end value to reachThe tween's duration
-
+
Tweens a property or field to the given value using default plugins
A getter for the field or property to tween.
Example usage with lambda:()=> myProperty
@@ -1492,7 +1500,7 @@
Example usage with lambda:x=> myProperty = x
The end value to reachThe tween's duration
-
+
Tweens a property or field to the given value using default plugins
A getter for the field or property to tween.
Example usage with lambda:()=> myProperty
@@ -1543,7 +1551,7 @@
Example usage with lambda:x=> myProperty = x
The end value to reachThe tween's duration
-
+
Tweens only one axis of a Vector3 to the given value using default plugins.
A getter for the field or property to tween.
Example usage with lambda:()=> myProperty
@@ -2039,5 +2047,23 @@
Public only so custom shortcuts can access some of these methods
+
+
+ A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ a Vector2/3/4 plugin on WP8.1
+
+
+
+
+ A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ a Vector2/3/4 plugin on WP8.1
+
+
+
+
+ A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ a Vector2/3/4 plugin on WP8.1
+
+
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll
index a07c2a1..6d3fdb0 100644
Binary files a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll and b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll differ
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll.mdb b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll.mdb
index d730cef..43052ed 100644
Binary files a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll.mdb and b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/DOTween.dll.mdb differ
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll
index 405fd43..21681c9 100644
Binary files a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll and b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll differ
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll.mdb b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll.mdb
index 9702dbf..774012d 100644
Binary files a/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll.mdb and b/Win81CompatibilityTest.Unity4/Assets/Scripts/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/Win81CompatibilityTest.Unity4/Assets/Scripts/TestScene.cs b/Win81CompatibilityTest.Unity4/Assets/Scripts/TestScene.cs
index ee2e535..cbe6c88 100644
--- a/Win81CompatibilityTest.Unity4/Assets/Scripts/TestScene.cs
+++ b/Win81CompatibilityTest.Unity4/Assets/Scripts/TestScene.cs
@@ -22,7 +22,7 @@ public class TestScene : MonoBehaviour
SampleFloatClass sampleFloatClass;
SampleVector3Class sampleV3Class;
ISampleClass isampleClass;
- Vector3Plugin dotweenV3Class;
+ // Vector3Plugin dotweenV3Class;
ITweenPlugin idotweenClass;
string testId;
@@ -33,8 +33,8 @@ public class TestScene : MonoBehaviour
FloatTest();
log += "\n";
Vector3Test();
- log += "\n";
- DOTweenVector3Test();
+ // log += "\n";
+ // DOTweenVector3Test();
log += "\n\nFIRST TEST ENDED";
log += "\n\nNOW WAITING 1 SECOND...";
@@ -53,72 +53,72 @@ public class TestScene : MonoBehaviour
// DOTween.To(()=>intToTween, x=> intToTween = x, 100, 4).OnUpdate(()=> text.text = intToTween.ToString());
}
- void DOTweenVector3Test()
- {
- testId = "DOVector3 Class AsCast:";
- try {
- dotweenV3Class = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((dotweenV3Class as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // void DOTweenVector3Test()
+ // {
+ // testId = "DOVector3 Class AsCast:";
+ // try {
+ // dotweenV3Class = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((dotweenV3Class as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Class AsCast (object):";
- try {
- dotweenV3Class = new Vector3Plugin();
- log += string.Format("{0}{1} " + (((object)dotweenV3Class as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Class AsCast (object):";
+ // try {
+ // dotweenV3Class = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + (((object)dotweenV3Class as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Class PrefCast:";
- try {
- dotweenV3Class = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((ABSTweenPlugin)dotweenV3Class == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Class PrefCast:";
+ // try {
+ // dotweenV3Class = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((ABSTweenPlugin)dotweenV3Class == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Class PrefCast (object):";
- try {
- dotweenV3Class = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((ABSTweenPlugin)((object)dotweenV3Class) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Class PrefCast (object):";
+ // try {
+ // dotweenV3Class = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((ABSTweenPlugin)((object)dotweenV3Class) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Interface AsCast:";
- try {
- idotweenClass = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((idotweenClass as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Interface AsCast:";
+ // try {
+ // idotweenClass = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((idotweenClass as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Interface AsCast (object):";
- try {
- idotweenClass = new Vector3Plugin();
- log += string.Format("{0}{1} " + (((object)idotweenClass as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Interface AsCast (object):";
+ // try {
+ // idotweenClass = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + (((object)idotweenClass as ABSTweenPlugin) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Interface PrefCast:";
- try {
- idotweenClass = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((ABSTweenPlugin)idotweenClass == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
+ // testId = "DOVector3 Interface PrefCast:";
+ // try {
+ // idotweenClass = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((ABSTweenPlugin)idotweenClass == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
- testId = "DOVector3 Interface PrefCast (object):";
- try {
- idotweenClass = new Vector3Plugin();
- log += string.Format("{0}{1} " + ((ABSTweenPlugin)((object)idotweenClass) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
- } catch (Exception e) {
- log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
- }
- }
+ // testId = "DOVector3 Interface PrefCast (object):";
+ // try {
+ // idotweenClass = new Vector3Plugin();
+ // log += string.Format("{0}{1} " + ((ABSTweenPlugin)((object)idotweenClass) == null ? "{2}" : "{3}"), logPrefix, testId, failStr, successStr);
+ // } catch (Exception e) {
+ // log += string.Format("{0}{1} error > " + e.Message + "", logPrefix, testId);
+ // }
+ // }
void Vector3Test()
{
diff --git a/Win81CompatibilityTest.unitypackage b/Win81CompatibilityTest.unitypackage
index 6044364..b5824f0 100644
Binary files a/Win81CompatibilityTest.unitypackage and b/Win81CompatibilityTest.unitypackage differ
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/ColorSurrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/ColorSurrogate.cs
new file mode 100644
index 0000000..b1e168e
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/ColorSurrogate.cs
@@ -0,0 +1,66 @@
+using UnityEngine;
+
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/15 12:10
+
+#pragma warning disable 1591
+namespace DG.Tweening.Core.Surrogates
+{
+ public struct ColorSurrogate
+ {
+ public float r, g, b, a;
+
+ public ColorSurrogate(float r, float g, float b, float a)
+ {
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ this.a = a;
+ }
+
+ #region Operations
+
+ public static ColorSurrogate operator +(ColorSurrogate v1, ColorSurrogate v2)
+ {
+ return new ColorSurrogate(v1.r + v2.r, v1.g + v2.g, v1.b + v2.b, v1.a + v2.a);
+ }
+
+ public static ColorSurrogate operator -(ColorSurrogate v1, ColorSurrogate v2)
+ {
+ return new ColorSurrogate(v1.r - v2.r, v1.g - v2.g, v1.b - v2.b, v1.a - v2.a);
+ }
+
+ public static ColorSurrogate operator *(ColorSurrogate v1, float f)
+ {
+ return new ColorSurrogate(v1.r * f, v1.g * f, v1.b * f, v1.a * f);
+ }
+
+ #endregion
+
+ #region Conversions
+
+ public static implicit operator Color(ColorSurrogate v)
+ {
+ return new Color(v.r, v.g, v.b, v.a);
+ }
+
+ public static implicit operator ColorSurrogate(Color v)
+ {
+ return new ColorSurrogate(v.r, v.g, v.b, v.a);
+ }
+
+ public static implicit operator Color32(ColorSurrogate v)
+ {
+ return new Color32((byte)(Mathf.Clamp01(v.r) * 255f), (byte)(Mathf.Clamp01(v.g) * 255f), (byte)(Mathf.Clamp01(v.b) * 255f), (byte)(Mathf.Clamp01(v.a) * 255f));
+ }
+
+ public static implicit operator ColorSurrogate(Color32 v)
+ {
+ return new ColorSurrogate((float)v.r / 255f, (float)v.g / 255f, (float)v.b / 255f, (float)v.a / 255f);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/QuaternionSurrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/QuaternionSurrogate.cs
new file mode 100644
index 0000000..ca09ebe
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/QuaternionSurrogate.cs
@@ -0,0 +1,67 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/15 18:44
+
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Core.Surrogates
+{
+ public struct QuaternionSurrogate
+ {
+ public float x, y, z, w;
+
+ public QuaternionSurrogate(float x, float y, float z, float w)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ #region Operations
+
+ public static QuaternionSurrogate operator *(QuaternionSurrogate lhs, QuaternionSurrogate rhs)
+ {
+ return new QuaternionSurrogate(lhs.w * rhs.x + lhs.x * rhs.w + lhs.y * rhs.z - lhs.z * rhs.y, lhs.w * rhs.y + lhs.y * rhs.w + lhs.z * rhs.x - lhs.x * rhs.z, lhs.w * rhs.z + lhs.z * rhs.w + lhs.x * rhs.y - lhs.y * rhs.x, lhs.w * rhs.w - lhs.x * rhs.x - lhs.y * rhs.y - lhs.z * rhs.z);
+ }
+
+ public static Vector3Surrogate operator *(QuaternionSurrogate rotation, Vector3Surrogate point)
+ {
+ float num = rotation.x * 2f;
+ float num2 = rotation.y * 2f;
+ float num3 = rotation.z * 2f;
+ float num4 = rotation.x * num;
+ float num5 = rotation.y * num2;
+ float num6 = rotation.z * num3;
+ float num7 = rotation.x * num2;
+ float num8 = rotation.x * num3;
+ float num9 = rotation.y * num3;
+ float num10 = rotation.w * num;
+ float num11 = rotation.w * num2;
+ float num12 = rotation.w * num3;
+ Vector3Surrogate result;
+ result.x = (1f - (num5 + num6)) * point.x + (num7 - num12) * point.y + (num8 + num11) * point.z;
+ result.y = (num7 + num12) * point.x + (1f - (num4 + num6)) * point.y + (num9 - num10) * point.z;
+ result.z = (num8 - num11) * point.x + (num9 + num10) * point.y + (1f - (num4 + num5)) * point.z;
+ return result;
+ }
+
+ #endregion
+
+ #region Conversions
+
+ public static implicit operator Quaternion(QuaternionSurrogate v)
+ {
+ return new Quaternion(v.x, v.y, v.z, v.w);
+ }
+
+ public static implicit operator QuaternionSurrogate(Quaternion v)
+ {
+ return new QuaternionSurrogate(v.x, v.y, v.z, v.w);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/Vector2Surrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector2Surrogate.cs
new file mode 100644
index 0000000..ab03771
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector2Surrogate.cs
@@ -0,0 +1,63 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:42
+
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Core.Surrogates
+{
+ ///
+ /// A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ /// a Vector2/3/4 plugin on WP8.1
+ ///
+ public struct Vector2Surrogate
+ {
+ public float x, y;
+
+ public float magnitude {
+ get { return Mathf.Sqrt(x * x + y * y); }
+ }
+
+ public Vector2Surrogate(float x, float y)
+ : this()
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ #region Operations
+
+ public static Vector2Surrogate operator +(Vector2Surrogate v1, Vector2Surrogate v2)
+ {
+ return new Vector2Surrogate(v1.x + v2.x, v1.y + v2.y);
+ }
+
+ public static Vector2Surrogate operator -(Vector2Surrogate v1, Vector2Surrogate v2)
+ {
+ return new Vector2Surrogate(v1.x - v2.x, v1.y - v2.y);
+ }
+
+ public static Vector2Surrogate operator *(Vector2Surrogate v1, float f)
+ {
+ return new Vector2Surrogate(v1.x * f, v1.y * f);
+ }
+
+ #endregion
+
+ #region Conversions
+
+ public static implicit operator Vector2(Vector2Surrogate v)
+ {
+ return new Vector2(v.x, v.y);
+ }
+
+ public static implicit operator Vector2Surrogate(Vector2 v)
+ {
+ return new Vector2Surrogate(v.x, v.y);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs
new file mode 100644
index 0000000..1e68d32
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs
@@ -0,0 +1,72 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:37
+
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Core.Surrogates
+{
+ ///
+ /// A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ /// a Vector2/3/4 plugin on WP8.1
+ ///
+ public struct Vector3Surrogate
+ {
+ public float x, y, z;
+
+ public static Vector3Surrogate zero {
+ get { return new Vector3Surrogate(0, 0, 0); }
+ }
+
+ public float magnitude {
+ get { return Mathf.Sqrt(x * x + y * y + z * z); }
+ }
+
+ public Vector3Surrogate(float x, float y, float z)
+ : this()
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ #region Operations
+
+ public static Vector3Surrogate operator +(Vector3Surrogate v1, Vector3Surrogate v2)
+ {
+ return new Vector3Surrogate(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
+ }
+
+ public static Vector3Surrogate operator -(Vector3Surrogate v1, Vector3Surrogate v2)
+ {
+ return new Vector3Surrogate(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
+ }
+ public static Vector3Surrogate operator -(Vector3Surrogate v1)
+ {
+ return new Vector3Surrogate(-v1.x, -v1.y, -v1.z);
+ }
+
+ public static Vector3Surrogate operator *(Vector3Surrogate v1, float f)
+ {
+ return new Vector3Surrogate(v1.x * f, v1.y * f, v1.z * f);
+ }
+
+ #endregion
+
+ #region Conversions
+
+ public static implicit operator Vector3(Vector3Surrogate v)
+ {
+ return new Vector3(v.x, v.y, v.z);
+ }
+
+ public static implicit operator Vector3Surrogate(Vector3 v)
+ {
+ return new Vector3Surrogate(v.x, v.y, v.z);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/Vector4Surrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector4Surrogate.cs
new file mode 100644
index 0000000..44eaa1f
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector4Surrogate.cs
@@ -0,0 +1,113 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:10
+
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Core.Surrogates
+{
+ ///
+ /// A surrogate for Vector2/3/4 values to work around Unity's bug when trying to cast to
+ /// a Vector2/3/4 plugin on WP8.1
+ ///
+ public struct Vector4Surrogate
+ {
+ public float x, y, z, w;
+
+ public float magnitude {
+ get { return Mathf.Sqrt(x * x + y * y + z * z + w * w); }
+ }
+
+ public Vector4Surrogate(float x, float y, float z, float w)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ #region Operations
+
+ public static Vector4Surrogate operator +(Vector4Surrogate v1, Vector4Surrogate v2)
+ {
+ return new Vector4Surrogate(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z, v1.w + v2.w);
+ }
+
+ public static Vector4Surrogate operator -(Vector4Surrogate v1, Vector4Surrogate v2)
+ {
+ return new Vector4Surrogate(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z, v1.w - v2.w);
+ }
+
+ public static Vector4Surrogate operator *(Vector4Surrogate v1, float f)
+ {
+ return new Vector4Surrogate(v1.x * f, v1.y * f, v1.z * f, v1.w * f);
+ }
+
+// public static Vector4Surrogate operator /(Vector4Surrogate v1, float f)
+// {
+// return new Vector4Surrogate(v1.x / f, v1.y / f, v1.z / f, v1.w / f);
+// }
+
+ #endregion
+
+ #region Comparisons
+
+ // public static bool operator <(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return v1.magnitude < v2.magnitude;
+// }
+//
+// public static bool operator <=(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return v1.magnitude <= v2.magnitude;
+// }
+//
+// public static bool operator >(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return v1.magnitude > v2.magnitude;
+// }
+//
+// public static bool operator >=(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return v1.magnitude >= v2.magnitude;
+// }
+//
+// public static bool operator ==(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return v1.x == v2.x && v1.y == v2.y && v1.z == v2.z && v1.w == v2.w;
+// }
+//
+// public static bool operator !=(Vector4Surrogate v1, Vector4Surrogate v2)
+// {
+// return !(v1 == v2);
+ // }
+
+ #endregion
+
+ #region Conversions
+
+// public static implicit operator Vector2(Vector4Surrogate v)
+// {
+// return new Vector2(v.x, v.y);
+// }
+//
+// public static implicit operator Vector3(Vector4Surrogate v)
+// {
+// return new Vector3(v.x, v.y, v.z);
+// }
+
+ public static implicit operator Vector4(Vector4Surrogate v)
+ {
+ return new Vector4(v.x, v.y, v.z, v.w);
+ }
+
+ public static implicit operator Vector4Surrogate(Vector4 v)
+ {
+ return new Vector4Surrogate(v.x, v.y, v.z, v.w);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Core/Utils.cs b/_DOTween.Assembly/DOTween/Core/Utils.cs
index 9a7b60a..5c1d133 100644
--- a/_DOTween.Assembly/DOTween/Core/Utils.cs
+++ b/_DOTween.Assembly/DOTween/Core/Utils.cs
@@ -22,7 +22,7 @@ namespace DG.Tweening.Core
///
/// Returns the 2D angle between two vectors
///
- public static float Angle2D(Vector3 from, Vector3 to)
+ internal static float Angle2D(Vector3 from, Vector3 to)
{
Vector2 baseDir = Vector2.right;
to -= from;
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index 7ae6851..c903a1c 100644
--- a/_DOTween.Assembly/DOTween/DOTween.cs
+++ b/_DOTween.Assembly/DOTween/DOTween.cs
@@ -4,6 +4,9 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using System;
using System.Collections;
using System.Collections.Generic;
@@ -21,7 +24,7 @@ namespace DG.Tweening
public class DOTween
{
/// DOTween's version
- public static readonly string Version = "1.0.490";
+ public static readonly string Version = "1.0.531";
///////////////////////////////////////////////
// Options ////////////////////////////////////
@@ -304,40 +307,65 @@ namespace DG.Tweening
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Vector2 endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Vector2 endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Vector4 endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Vector4 endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Color endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Color endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
@@ -377,20 +405,34 @@ namespace DG.Tweening
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
/// The axis to tween
+#if WP81
+ public static TweenerCore ToAxis(DOGetter getter, DOSetter setter, float endValue, float duration, AxisConstraint axisConstraint = AxisConstraint.X)
+ {
+ TweenerCore t = ApplyTo(getter, setter, new Vector3Surrogate(endValue, endValue, endValue), duration);
+ t.plugOptions.axisConstraint = axisConstraint;
+ return t;
+ }
+#else
public static TweenerCore ToAxis(DOGetter getter, DOSetter setter, float endValue, float duration, AxisConstraint axisConstraint = AxisConstraint.X)
{
TweenerCore t = ApplyTo(getter, setter, new Vector3(endValue, endValue, endValue), duration);
t.plugOptions.axisConstraint = axisConstraint;
return t;
}
+#endif
/// Tweens only the alpha of a Color to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static Tweener ToAlpha(DOGetter getter, DOSetter setter, float endValue, float duration)
+ { return ApplyTo(getter, setter, new ColorSurrogate(0, 0, 0, endValue), duration).SetOptions(true); }
+#else
public static Tweener ToAlpha(DOGetter getter, DOSetter setter, float endValue, float duration)
{ return ApplyTo(getter, setter, new Color(0, 0, 0, endValue), duration).SetOptions(true); }
+#endif
#endregion
diff --git a/_DOTween.Assembly/DOTween/DOTween.csproj b/_DOTween.Assembly/DOTween/DOTween.csproj
index 0373e35..2518fcf 100644
--- a/_DOTween.Assembly/DOTween/DOTween.csproj
+++ b/_DOTween.Assembly/DOTween/DOTween.csproj
@@ -71,8 +71,13 @@
+
+
+
+
+
@@ -81,12 +86,15 @@
+
+
+
@@ -95,6 +103,8 @@
+
+
diff --git a/_DOTween.Assembly/DOTween/Plugins/ColorPlugin.cs b/_DOTween.Assembly/DOTween/Plugins/ColorPlugin.cs
index 4a101b5..6604d13 100644
--- a/_DOTween.Assembly/DOTween/Plugins/ColorPlugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/ColorPlugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/07/10 14:33
//
// License Copyright (c) Daniele Giardini.
@@ -72,4 +73,5 @@ namespace DG.Tweening.Plugins
setter(res);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/ColorSurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/ColorSurrogatePlugin.cs
new file mode 100644
index 0000000..80d5af6
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/ColorSurrogatePlugin.cs
@@ -0,0 +1,74 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/15 12:17
+
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class ColorSurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ ColorSurrogate prevEndVal = t.endValue;
+ t.endValue = t.getter();
+ t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
+ ColorSurrogate to = t.endValue;
+ if (!t.plugOptions.alphaOnly) to = t.startValue;
+ else to.a = t.startValue.a;
+ t.setter(to);
+ }
+
+ public override ColorSurrogate ConvertToStartValue(TweenerCore t, ColorSurrogate value)
+ {
+ return value;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ t.changeValue = t.endValue - t.startValue;
+ }
+
+ public override float GetSpeedBasedDuration(ColorOptions options, float unitsXSecond, ColorSurrogate changeValue)
+ {
+ return 1f / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(ColorOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, ColorSurrogate startValue, ColorSurrogate changeValue, float duration, bool usingInversePosition)
+ {
+ if (t.loopType == LoopType.Incremental) startValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ startValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ if (!options.alphaOnly) {
+ startValue.r += changeValue.r * easeVal;
+ startValue.g += changeValue.g * easeVal;
+ startValue.b += changeValue.b * easeVal;
+ startValue.a += changeValue.a * easeVal;
+ setter(startValue);
+ return;
+ }
+
+ // Alpha only
+ ColorSurrogate res = getter();
+ res.a = startValue.a + changeValue.a * easeVal;
+ setter(res);
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
index 1665a9a..d0dc97d 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
@@ -4,10 +4,12 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using System;
using System.Collections.Generic;
using DG.Tweening.Core;
-using DG.Tweening.Plugins.Options;
using UnityEngine;
namespace DG.Tweening.Plugins.Core
@@ -43,7 +45,15 @@ namespace DG.Tweening.Plugins.Core
Type t1 = typeof(T1);
Type t2 = typeof(T2);
ITweenPlugin plugin = null;
-
+#if WP81
+ if (t1 == typeof(Vector3Surrogate) && t1 == t2) {
+ if (_vector3Plugin == null) _vector3Plugin = new Vector3SurrogatePlugin();
+ plugin = _vector3Plugin;
+ } else if (t1 == typeof(Vector3) && t2 == typeof(Vector3[])) {
+ if (_vector3ArrayPlugin == null) _vector3ArrayPlugin = new Vector3ArrayPlugin();
+ plugin = _vector3ArrayPlugin;
+ }
+#else
if (t1 == typeof(Vector3)) {
if (t1 == t2) {
if (_vector3Plugin == null) _vector3Plugin = new Vector3Plugin();
@@ -52,28 +62,67 @@ namespace DG.Tweening.Plugins.Core
if (_vector3ArrayPlugin == null) _vector3ArrayPlugin = new Vector3ArrayPlugin();
plugin = _vector3ArrayPlugin;
}
- } else if (t1 == typeof(Quaternion)) {
+ }
+#endif
+#if WP81
+ else if (t1 == typeof(QuaternionSurrogate)) {
+ if (t2 == typeof(Quaternion)) Debugger.LogError("Quaternion tweens require a Vector3 endValue");
+ else {
+ if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionSurrogatePlugin();
+ plugin = _quaternionPlugin;
+ }
+ }
+#else
+ else if (t1 == typeof(Quaternion)) {
if (t2 == typeof(Quaternion)) Debugger.LogError("Quaternion tweens require a Vector3 endValue");
else {
if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionPlugin();
plugin = _quaternionPlugin;
}
- } else if (t1 == typeof(Vector2)) {
+ }
+#endif
+#if WP81
+ else if (t1 == typeof(Vector2Surrogate)) {
+ if (_vector2Plugin == null) _vector2Plugin = new Vector2SurrogatePlugin();
+ plugin = _vector2Plugin;
+ }
+#else
+ else if (t1 == typeof(Vector2)) {
if (_vector2Plugin == null) _vector2Plugin = new Vector2Plugin();
plugin = _vector2Plugin;
- } else if (t1 == typeof(float)) {
+ }
+#endif
+ else if (t1 == typeof(float)) {
if (_floatPlugin == null) _floatPlugin = new FloatPlugin();
plugin = _floatPlugin;
- } else if (t1 == typeof(Color)) {
+ }
+#if WP81
+ else if (t1 == typeof(ColorSurrogate)) {
+ if (_colorPlugin == null) _colorPlugin = new ColorSurrogatePlugin();
+ plugin = _colorPlugin;
+ }
+#else
+ else if (t1 == typeof(Color)) {
if (_colorPlugin == null) _colorPlugin = new ColorPlugin();
plugin = _colorPlugin;
- } else if (t1 == typeof(int)) {
+ }
+#endif
+ else if (t1 == typeof(int)) {
if (_intPlugin == null) _intPlugin = new IntPlugin();
plugin = _intPlugin;
- } else if (t1 == typeof(Vector4)) {
+ }
+#if WP81
+ else if (t1 == typeof(Vector4Surrogate)) {
+ if (_vector4Plugin == null) _vector4Plugin = new Vector4SurrogatePlugin();
+ plugin = _vector4Plugin;
+ }
+#else
+ else if (t1 == typeof(Vector4)) {
if (_vector4Plugin == null) _vector4Plugin = new Vector4Plugin();
plugin = _vector4Plugin;
- } else if (t1 == typeof(Rect)) {
+ }
+#endif
+ else if (t1 == typeof(Rect)) {
if (_rectPlugin == null) _rectPlugin = new RectPlugin();
plugin = _rectPlugin;
} else if (t1 == typeof(RectOffset)) {
@@ -99,61 +148,62 @@ namespace DG.Tweening.Plugins.Core
#if !WP81
if (plugin != null) return plugin as ABSTweenPlugin;
#else
+ if (plugin != null) return plugin as ABSTweenPlugin;
// WP8.1 fix tries
- if (plugin != null) {
- Debug.Log("PLUGIN FOUND, trying to assign it correctly...");
- ABSTweenPlugin p;
- ABSTweenPlugin pExplicit;
- // Explicit casting to Vector3Plugin
- try {
- pExplicit = (ABSTweenPlugin)plugin;
- if (pExplicit != null) Debug.Log("- EXPLICIT CAST SUCCESS X");
- p = pExplicit as ABSTweenPlugin;
- if (p != null) {
- Debug.Log("- PLUGIN SUCCESS X");
- return p;
- }
- } catch (Exception e) {
- Debug.Log("- PLUGIN FAIL X > " + e.Message);
- }
- // More regular ways
- try {
- p = plugin as ABSTweenPlugin;
- if (p != null) {
- Debug.Log("- PLUGIN SUCCESS A");
- return p;
- }
- } catch (Exception e) {
- Debug.Log("- PLUGIN FAIL A > " + e.Message);
- }
- try {
- System.Object obj = (object)plugin;
- p = obj as ABSTweenPlugin;
- if (p != null) {
- Debug.Log("- PLUGIN SUCCESS A2");
- return p;
- }
- } catch (Exception e) {
- Debug.Log("- PLUGIN FAIL A2 > " + e.Message);
- }
- try {
- p = (ABSTweenPlugin)plugin;
- Debug.Log("- PLUGIN SUCCESS B");
- return p;
- } catch (Exception e) {
- Debug.Log("- PLUGIN FAIL B > " + e.Message);
- }
- try {
- System.Object obj = (object)plugin;
- p = (ABSTweenPlugin)obj;
- Debug.Log("- PLUGIN SUCCESS B2");
- return p;
- } catch (Exception e) {
- Debug.Log("- PLUGIN FAIL B2 > " + e.Message);
- }
- return null;
- }
- Debug.Log("PLUGIN NOT FOUND");
+// if (plugin != null) {
+// Debug.Log("PLUGIN FOUND, trying to assign it correctly...");
+// ABSTweenPlugin p;
+// ABSTweenPlugin pExplicit;
+// // Explicit casting to Vector3Plugin
+// try {
+// pExplicit = (ABSTweenPlugin)plugin;
+// if (pExplicit != null) Debug.Log("- EXPLICIT CAST SUCCESS X");
+// p = pExplicit as ABSTweenPlugin;
+// if (p != null) {
+// Debug.Log("- PLUGIN SUCCESS X");
+// return p;
+// }
+// } catch (Exception e) {
+// Debug.Log("- PLUGIN FAIL X > " + e.Message);
+// }
+// // More regular ways
+// try {
+// p = plugin as ABSTweenPlugin;
+// if (p != null) {
+// Debug.Log("- PLUGIN SUCCESS A");
+// return p;
+// }
+// } catch (Exception e) {
+// Debug.Log("- PLUGIN FAIL A > " + e.Message);
+// }
+// try {
+// System.Object obj = (object)plugin;
+// p = obj as ABSTweenPlugin;
+// if (p != null) {
+// Debug.Log("- PLUGIN SUCCESS A2");
+// return p;
+// }
+// } catch (Exception e) {
+// Debug.Log("- PLUGIN FAIL A2 > " + e.Message);
+// }
+// try {
+// p = (ABSTweenPlugin)plugin;
+// Debug.Log("- PLUGIN SUCCESS B");
+// return p;
+// } catch (Exception e) {
+// Debug.Log("- PLUGIN FAIL B > " + e.Message);
+// }
+// try {
+// System.Object obj = (object)plugin;
+// p = (ABSTweenPlugin)obj;
+// Debug.Log("- PLUGIN SUCCESS B2");
+// return p;
+// } catch (Exception e) {
+// Debug.Log("- PLUGIN FAIL B2 > " + e.Message);
+// }
+// return null;
+// }
+// Debug.Log("PLUGIN NOT FOUND");
// WP8.1 fix tries END
#endif
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs b/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
index 91499e6..bca370e 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
@@ -4,6 +4,9 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using UnityEngine;
@@ -14,7 +17,11 @@ namespace DG.Tweening.Plugins.Core
internal static class SpecialPluginsUtils
{
// Returns TRUE if it's successful, FALSE otherwise
+#if WP81
+ internal static bool SetLookAt(TweenerCore t)
+#else
internal static bool SetLookAt(TweenerCore t)
+#endif
{
Transform trans = t.target as Transform;
Vector3 towards = t.endValue;
diff --git a/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs b/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
index 29c2f9e..2dec0a2 100644
--- a/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/07/07 20:02
//
// License Copyright (c) Daniele Giardini.
@@ -66,7 +67,7 @@ namespace DG.Tweening.Plugins
if (abs > 180) changeVal.z = changeVal.z > 0 ? -(360 - abs) : 360 - abs;
// - Assign
t.changeValue = changeVal;
- } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360) {
+ } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360 || t.isRelative) {
t.changeValue = t.endValue - t.startValue;
} else {
t.changeValue = t.endValue;
@@ -108,4 +109,5 @@ namespace DG.Tweening.Plugins
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
new file mode 100644
index 0000000..63c4ee6
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
@@ -0,0 +1,111 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/15 12:32
+
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class QuaternionSurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ Vector3Surrogate prevEndVal = t.endValue;
+ t.endValue = ((Quaternion)t.getter()).eulerAngles;
+ if (t.plugOptions.rotateMode == RotateMode.Fast && !t.isRelative) {
+ t.startValue = prevEndVal;
+ } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360) {
+ t.startValue = t.endValue + prevEndVal;
+ } else {
+ QuaternionSurrogate rot = t.getter();
+ if (t.plugOptions.rotateMode == RotateMode.WorldAxisAdd) {
+ t.startValue = ((Quaternion)rot * Quaternion.Inverse(rot) * Quaternion.Euler(prevEndVal) * (Quaternion)rot).eulerAngles;
+ } else {
+ t.startValue = ((Quaternion)rot * Quaternion.Euler(prevEndVal)).eulerAngles;
+ }
+ t.endValue = -prevEndVal;
+ }
+ t.setter(Quaternion.Euler(t.startValue));
+ }
+
+ public override Vector3Surrogate ConvertToStartValue(TweenerCore t, QuaternionSurrogate value)
+ {
+ return ((Quaternion)value).eulerAngles;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ if (t.plugOptions.rotateMode == RotateMode.Fast && !t.isRelative) {
+ // Rotation will be adapted to 360° and will take the shortest route
+ // - Adapt to 360°
+ Vector3Surrogate ev = t.endValue;
+ if (ev.x > 360) ev.x = ev.x % 360;
+ if (ev.y > 360) ev.y = ev.y % 360;
+ if (ev.z > 360) ev.z = ev.z % 360;
+ Vector3Surrogate changeVal = ev - t.startValue;
+ // - Find shortest rotation
+ float abs = (changeVal.x > 0 ? changeVal.x : -changeVal.x);
+ if (abs > 180) changeVal.x = changeVal.x > 0 ? -(360 - abs) : 360 - abs;
+ abs = (changeVal.y > 0 ? changeVal.y : -changeVal.y);
+ if (abs > 180) changeVal.y = changeVal.y > 0 ? -(360 - abs) : 360 - abs;
+ abs = (changeVal.z > 0 ? changeVal.z : -changeVal.z);
+ if (abs > 180) changeVal.z = changeVal.z > 0 ? -(360 - abs) : 360 - abs;
+ // - Assign
+ t.changeValue = changeVal;
+ } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360 || t.isRelative) {
+ t.changeValue = t.endValue - t.startValue;
+ } else {
+ t.changeValue = t.endValue;
+ }
+ }
+
+ public override float GetSpeedBasedDuration(QuaternionOptions options, float unitsXSecond, Vector3Surrogate changeValue)
+ {
+ return changeValue.magnitude / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(QuaternionOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, Vector3Surrogate startValue, Vector3Surrogate changeValue, float duration, bool usingInversePosition)
+ {
+ Vector3Surrogate endValue = startValue;
+
+ if (t.loopType == LoopType.Incremental) endValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ endValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ switch (options.rotateMode) {
+ case RotateMode.WorldAxisAdd:
+ case RotateMode.LocalAxisAdd:
+ QuaternionSurrogate startRot = Quaternion.Euler(startValue); // Reset rotation
+ endValue.x = changeValue.x * easeVal;
+ endValue.y = changeValue.y * easeVal;
+ endValue.z = changeValue.z * easeVal;
+ if (options.rotateMode == RotateMode.WorldAxisAdd) setter((Quaternion)startRot * Quaternion.Inverse(startRot) * Quaternion.Euler(endValue) * (Quaternion)startRot);
+ else setter((Quaternion)startRot * Quaternion.Euler(endValue));
+ break;
+ default:
+ endValue.x += changeValue.x * easeVal;
+ endValue.y += changeValue.y * easeVal;
+ endValue.z += changeValue.z * easeVal;
+ setter(Quaternion.Euler(endValue));
+ break;
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector2Plugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector2Plugin.cs
index d34f95b..b3c664d 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Vector2Plugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector2Plugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/07/10 16:51
//
// License Copyright (c) Daniele Giardini.
@@ -106,4 +107,5 @@ namespace DG.Tweening.Plugins
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector2SurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector2SurrogatePlugin.cs
new file mode 100644
index 0000000..7201161
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector2SurrogatePlugin.cs
@@ -0,0 +1,109 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:46
+
+using System;
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class Vector2SurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ Vector2Surrogate prevEndVal = t.endValue;
+ t.endValue = t.getter();
+ t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
+ Vector2Surrogate to = t.endValue;
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ to.x = t.startValue.x;
+ break;
+ case AxisConstraint.Y:
+ to.y = t.startValue.y;
+ break;
+ default:
+ to = t.startValue;
+ break;
+ }
+ if (t.plugOptions.snapping) {
+ to.x = (float)Math.Round(to.x);
+ to.y = (float)Math.Round(to.y);
+ }
+ t.setter(to);
+ }
+
+ public override Vector2Surrogate ConvertToStartValue(TweenerCore t, Vector2Surrogate value)
+ {
+ return value;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ t.changeValue = new Vector2Surrogate(t.endValue.x - t.startValue.x, 0);
+ break;
+ case AxisConstraint.Y:
+ t.changeValue = new Vector2Surrogate(0, t.endValue.y - t.startValue.y);
+ break;
+ default:
+ t.changeValue = t.endValue - t.startValue;
+ break;
+ }
+ }
+
+ public override float GetSpeedBasedDuration(VectorOptions options, float unitsXSecond, Vector2Surrogate changeValue)
+ {
+ return changeValue.magnitude / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(VectorOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, Vector2Surrogate startValue, Vector2Surrogate changeValue, float duration, bool usingInversePosition)
+ {
+ if (t.loopType == LoopType.Incremental) startValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ startValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ switch (options.axisConstraint) {
+ case AxisConstraint.X:
+ Vector2Surrogate resX = getter();
+ resX.x = startValue.x + changeValue.x * easeVal;
+ if (options.snapping) resX.x = (float)Math.Round(resX.x);
+ setter(resX);
+ break;
+ case AxisConstraint.Y:
+ Vector2Surrogate resY = getter();
+ resY.y = startValue.y + changeValue.y * easeVal;
+ if (options.snapping) resY.y = (float)Math.Round(resY.y);
+ setter(resY);
+ break;
+ default:
+ startValue.x += changeValue.x * easeVal;
+ startValue.y += changeValue.y * easeVal;
+ if (options.snapping) {
+ startValue.x = (float)Math.Round(startValue.x);
+ startValue.y = (float)Math.Round(startValue.y);
+ }
+ setter(startValue);
+ break;
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector3Plugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector3Plugin.cs
index 349e2b2..df65b2f 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Vector3Plugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector3Plugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/05/06 19:35
//
// License Copyright (c) Daniele Giardini.
@@ -121,4 +122,5 @@ namespace DG.Tweening.Plugins
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector3SurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector3SurrogatePlugin.cs
new file mode 100644
index 0000000..af29d5f
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector3SurrogatePlugin.cs
@@ -0,0 +1,123 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:44
+
+using System;
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class Vector3SurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ Vector3Surrogate prevEndVal = t.endValue;
+ t.endValue = t.getter();
+ t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
+ Vector3Surrogate to = t.endValue;
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ to.x = t.startValue.x;
+ break;
+ case AxisConstraint.Y:
+ to.y = t.startValue.y;
+ break;
+ case AxisConstraint.Z:
+ to.z = t.startValue.z;
+ break;
+ default:
+ to = t.startValue;
+ break;
+ }
+ if (t.plugOptions.snapping) {
+ to.x = (float)Math.Round(to.x);
+ to.y = (float)Math.Round(to.y);
+ to.z = (float)Math.Round(to.z);
+ }
+ t.setter(to);
+ }
+
+ public override Vector3Surrogate ConvertToStartValue(TweenerCore t, Vector3Surrogate value)
+ {
+ return value;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ t.changeValue = new Vector3Surrogate(t.endValue.x - t.startValue.x, 0, 0);
+ break;
+ case AxisConstraint.Y:
+ t.changeValue = new Vector3Surrogate(0, t.endValue.y - t.startValue.y, 0);
+ break;
+ case AxisConstraint.Z:
+ t.changeValue = new Vector3Surrogate(0, 0, t.endValue.z - t.startValue.z);
+ break;
+ default:
+ t.changeValue = t.endValue - t.startValue;
+ break;
+ }
+ }
+
+ public override float GetSpeedBasedDuration(VectorOptions options, float unitsXSecond, Vector3Surrogate changeValue)
+ {
+ return changeValue.magnitude / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(VectorOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, Vector3Surrogate startValue, Vector3Surrogate changeValue, float duration, bool usingInversePosition)
+ {
+ if (t.loopType == LoopType.Incremental) startValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ startValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ switch (options.axisConstraint) {
+ case AxisConstraint.X:
+ Vector3Surrogate resX = getter();
+ resX.x = startValue.x + changeValue.x * easeVal;
+ if (options.snapping) resX.x = (float)Math.Round(resX.x);
+ setter(resX);
+ break;
+ case AxisConstraint.Y:
+ Vector3Surrogate resY = getter();
+ resY.y = startValue.y + changeValue.y * easeVal;
+ if (options.snapping) resY.y = (float)Math.Round(resY.y);
+ setter(resY);
+ break;
+ case AxisConstraint.Z:
+ Vector3Surrogate resZ = getter();
+ resZ.z = startValue.z + changeValue.z * easeVal;
+ if (options.snapping) resZ.z = (float)Math.Round(resZ.z);
+ setter(resZ);
+ break;
+ default:
+ startValue.x += changeValue.x * easeVal;
+ startValue.y += changeValue.y * easeVal;
+ startValue.z += changeValue.z * easeVal;
+ if (options.snapping) {
+ startValue.x = (float)Math.Round(startValue.x);
+ startValue.y = (float)Math.Round(startValue.y);
+ startValue.z = (float)Math.Round(startValue.z);
+ }
+ setter(startValue);
+ break;
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector4Plugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector4Plugin.cs
index 3b30fa6..2b73206 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Vector4Plugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector4Plugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/07/10 16:53
//
// License Copyright (c) Daniele Giardini.
@@ -136,4 +137,5 @@ namespace DG.Tweening.Plugins
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Vector4SurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/Vector4SurrogatePlugin.cs
new file mode 100644
index 0000000..17c0df0
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/Vector4SurrogatePlugin.cs
@@ -0,0 +1,139 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/14 12:19
+
+using System;
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class Vector4SurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ Vector4Surrogate prevEndVal = t.endValue;
+ t.endValue = t.getter();
+ t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
+ Vector4Surrogate to = t.endValue;
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ to.x = t.startValue.x;
+ break;
+ case AxisConstraint.Y:
+ to.y = t.startValue.y;
+ break;
+ case AxisConstraint.Z:
+ to.z = t.startValue.z;
+ break;
+ case AxisConstraint.W:
+ to.w = t.startValue.w;
+ break;
+ default:
+ to = t.startValue;
+ break;
+ }
+ if (t.plugOptions.snapping) {
+ to.x = (float)Math.Round(to.x);
+ to.y = (float)Math.Round(to.y);
+ to.z = (float)Math.Round(to.z);
+ to.w = (float)Math.Round(to.w);
+ }
+ t.setter(to);
+ }
+
+ public override Vector4Surrogate ConvertToStartValue(TweenerCore t, Vector4Surrogate value)
+ {
+ return value;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ switch (t.plugOptions.axisConstraint) {
+ case AxisConstraint.X:
+ t.changeValue = new Vector4Surrogate(t.endValue.x - t.startValue.x, 0, 0, 0);
+ break;
+ case AxisConstraint.Y:
+ t.changeValue = new Vector4Surrogate(0, t.endValue.y - t.startValue.y, 0, 0);
+ break;
+ case AxisConstraint.Z:
+ t.changeValue = new Vector4Surrogate(0, 0, t.endValue.z - t.startValue.z, 0);
+ break;
+ case AxisConstraint.W:
+ t.changeValue = new Vector4Surrogate(0, 0, 0, t.endValue.w - t.startValue.w);
+ break;
+ default:
+ t.changeValue = t.endValue - t.startValue;
+ break;
+ }
+ }
+
+ public override float GetSpeedBasedDuration(VectorOptions options, float unitsXSecond, Vector4Surrogate changeValue)
+ {
+ return changeValue.magnitude / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(VectorOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, Vector4Surrogate startValue, Vector4Surrogate changeValue, float duration, bool usingInversePosition)
+ {
+ if (t.loopType == LoopType.Incremental) startValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ startValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ switch (options.axisConstraint) {
+ case AxisConstraint.X:
+ Vector4Surrogate resX = getter();
+ resX.x = startValue.x + changeValue.x * easeVal;
+ if (options.snapping) resX.x = (float)Math.Round(resX.x);
+ setter(resX);
+ break;
+ case AxisConstraint.Y:
+ Vector4Surrogate resY = getter();
+ resY.y = startValue.y + changeValue.y * easeVal;
+ if (options.snapping) resY.y = (float)Math.Round(resY.y);
+ setter(resY);
+ break;
+ case AxisConstraint.Z:
+ Vector4Surrogate resZ = getter();
+ resZ.z = startValue.z + changeValue.z * easeVal;
+ if (options.snapping) resZ.z = (float)Math.Round(resZ.z);
+ setter(resZ);
+ break;
+ case AxisConstraint.W:
+ Vector4Surrogate resW = getter();
+ resW.w = startValue.w + changeValue.w * easeVal;
+ if (options.snapping) resW.w = (float)Math.Round(resW.w);
+ setter(resW);
+ break;
+ default:
+ startValue.x += changeValue.x * easeVal;
+ startValue.y += changeValue.y * easeVal;
+ startValue.z += changeValue.z * easeVal;
+ startValue.w += changeValue.w * easeVal;
+ if (options.snapping) {
+ startValue.x = (float)Math.Round(startValue.x);
+ startValue.y = (float)Math.Round(startValue.y);
+ startValue.z = (float)Math.Round(startValue.z);
+ startValue.w = (float)Math.Round(startValue.w);
+ }
+ setter(startValue);
+ break;
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
index 9006aa1..89dc1e4 100644
--- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
@@ -4,6 +4,9 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using System.Collections.Generic;
using DG.Tweening.Core;
using DG.Tweening.Core.Enums;
@@ -235,7 +238,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMove(this Rigidbody target, Vector3 endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x=> target.MovePosition(x), endValue, duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, endValue, duration)
+#endif
.SetOptions(snapping).SetTarget(target);
}
@@ -245,7 +252,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMoveX(this Rigidbody target, float endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x => target.MovePosition(x), new Vector3(endValue, 0, 0), duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, new Vector3(endValue, 0, 0), duration)
+#endif
.SetOptions(AxisConstraint.X, snapping).SetTarget(target);
}
@@ -255,7 +266,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMoveY(this Rigidbody target, float endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x => target.MovePosition(x), new Vector3(0, endValue, 0), duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, new Vector3(0, endValue, 0), duration)
+#endif
.SetOptions(AxisConstraint.Y, snapping).SetTarget(target);
}
@@ -265,7 +280,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMoveZ(this Rigidbody target, float endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x => target.MovePosition(x), new Vector3(0, 0, endValue), duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, new Vector3(0, 0, endValue), duration)
+#endif
.SetOptions(AxisConstraint.Z, snapping).SetTarget(target);
}
@@ -275,7 +294,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.MoveRotation(x), endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -288,7 +311,11 @@ namespace DG.Tweening
/// The vector that defines in which direction up is (default: Vector3.up)
public static Tweener DOLookAt(this Rigidbody target, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None, Vector3? up = null)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.MoveRotation(x), towards, duration)
+#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, towards, duration)
+#endif
.SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetLookAt);
t.plugOptions.axisConstraint = axisConstraint;
t.plugOptions.up = (up == null) ? Vector3.up : (Vector3)up;
@@ -411,7 +438,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DORotate(this Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -423,7 +454,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DOLocalRotate(this Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.localRotation, x => target.localRotation = x, endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.localRotation, x => target.localRotation = x, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -483,7 +518,11 @@ namespace DG.Tweening
/// The vector that defines in which direction up is (default: Vector3.up)
public static Tweener DOLookAt(this Transform target, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None, Vector3? up = null)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, towards, duration)
+#else
TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, towards, duration)
+#endif
.SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetLookAt);
t.plugOptions.axisConstraint = axisConstraint;
t.plugOptions.up = (up == null) ? Vector3.up : (Vector3)up;
@@ -664,8 +703,115 @@ namespace DG.Tweening
return t;
}
+ #endregion
+
#region Blendables
+ #region Light
+
+ /// Tweens a Light's color to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Light as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this Light target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #region Material
+
+ /// Tweens a Material's color to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Material as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this Material target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+ /// Tweens a Material's named color property to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Material as the tween's target so it can be used for filtered operations
+ /// The value to tween to
+ /// The name of the material property to tween (like _Tint or _SpecColor)
+ /// The duration of the tween
+ public static Tweener DOBlendableColor(this Material target, Color endValue, string property, float duration)
+ {
+ if (!target.HasProperty(property)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(property);
+ return null;
+ }
+
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.SetColor(property, target.GetColor(property) + diff);
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ /// Tweens a Material's alpha BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the Material as the tween's target so it can be used for filtered operations
+ /// The value to tween byThe duration of the tween
+ public static Tweener DOBlendableFadeBy(this Material target, float byValue, float duration)
+ {
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.color += diff;
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+ /// Tweens a Material's named alpha property BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the Material as the tween's target so it can be used for filtered operations
+ /// The value to tween by
+ /// The name of the material property to tween (like _Tint or _SpecColor)
+ /// The duration of the tween
+ public static Tweener DOBlendableFadeBy(this Material target, float byValue, string property, float duration)
+ {
+ if (!target.HasProperty(property)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(property);
+ return null;
+ }
+
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.SetColor(property, target.GetColor(property) + diff);
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #region Transform
+
/// Tweens a Transform's position BY the given value (as if you chained a SetRelative),
/// in a way that allows other DOBlendableMove tweens to work together on the same target,
/// instead than fight each other as multiple DOMove would do.
@@ -674,12 +820,21 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOBlendableMoveBy(this Transform target, Vector3 byValue, float duration, bool snapping = false)
{
+#if WP81
+ Vector3Surrogate to = Vector3Surrogate.zero;
+ return DOTween.To(() => to, x => {
+ Vector3 diff = x - to;
+ to = x;
+ target.position += diff;
+ }, byValue, duration)
+#else
Vector3 to = Vector3.zero;
return DOTween.To(() => to, x => {
Vector3 diff = x - to;
to = x;
target.position += diff;
}, byValue, duration)
+#endif
.Blendable().SetOptions(snapping).SetTarget(target);
}
@@ -691,12 +846,21 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOBlendableLocalMoveBy(this Transform target, Vector3 byValue, float duration, bool snapping = false)
{
+#if WP81
+ Vector3Surrogate to = Vector3Surrogate.zero;
+ return DOTween.To(() => to, x => {
+ Vector3 diff = x - to;
+ to = x;
+ target.localPosition += diff;
+ }, byValue, duration)
+#else
Vector3 to = Vector3.zero;
return DOTween.To(() => to, x => {
Vector3 diff = x - to;
to = x;
target.localPosition += diff;
}, byValue, duration)
+#endif
.Blendable().SetOptions(snapping).SetTarget(target);
}
@@ -709,8 +873,12 @@ namespace DG.Tweening
public static Tweener DOBlendableRotateBy(this Transform target, Vector3 byValue, float duration, RotateMode mode = RotateMode.Fast)
{
Quaternion to = target.rotation;
+#if WP81
+ TweenerCore t = DOTween.To(() => to, x => {
+#else
TweenerCore t = DOTween.To(() => to, x => {
- Quaternion diff = x * Quaternion.Inverse(to);
+#endif
+ Quaternion diff = (Quaternion)x * Quaternion.Inverse(to);
to = x;
target.rotation = target.rotation * Quaternion.Inverse(target.rotation) * diff * target.rotation;
}, byValue, duration)
@@ -728,8 +896,12 @@ namespace DG.Tweening
public static Tweener DOBlendableLocalRotateBy(this Transform target, Vector3 byValue, float duration, RotateMode mode = RotateMode.Fast)
{
Quaternion to = target.localRotation;
+#if WP81
+ TweenerCore t = DOTween.To(() => to, x => {
+#else
TweenerCore t = DOTween.To(() => to, x => {
- Quaternion diff = x * Quaternion.Inverse(to);
+#endif
+ Quaternion diff = (Quaternion)x * Quaternion.Inverse(to);
to = x;
target.localRotation = target.localRotation * Quaternion.Inverse(target.localRotation) * diff * target.localRotation;
}, byValue, duration)
@@ -745,12 +917,21 @@ namespace DG.Tweening
/// The value to tween byThe duration of the tween
public static Tweener DOBlendableScaleBy(this Transform target, Vector3 byValue, float duration)
{
+#if WP81
+ Vector3Surrogate to = Vector3Surrogate.zero;
+ return DOTween.To(() => to, x => {
+ Vector3 diff = x - to;
+ to = x;
+ target.localScale += diff;
+ }, byValue, duration)
+#else
Vector3 to = Vector3.zero;
return DOTween.To(() => to, x => {
Vector3 diff = x - to;
to = x;
target.localScale += diff;
}, byValue, duration)
+#endif
.Blendable().SetTarget(target);
}
diff --git a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
index bcd3fdf..be23263 100644
--- a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
+++ b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
@@ -4,6 +4,9 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using DG.Tweening.Core;
using DG.Tweening.Core.Easing;
using DG.Tweening.Plugins;
@@ -581,7 +584,11 @@ namespace DG.Tweening
/// Options for Vector2 tweens
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#else
public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#endif
{
if (t == null || !t.active) return t;
@@ -591,7 +598,11 @@ namespace DG.Tweening
/// Options for Vector2 tweens
/// Selecting an axis will tween the vector only on that axis, leaving the others untouched
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#else
public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#endif
{
if (t == null || !t.active) return t;
@@ -602,7 +613,11 @@ namespace DG.Tweening
/// Options for Vector3 tweens
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#else
public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#endif
{
if (t == null || !t.active) return t;
@@ -612,7 +627,11 @@ namespace DG.Tweening
/// Options for Vector3 tweens
/// Selecting an axis will tween the vector only on that axis, leaving the others untouched
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#else
public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#endif
{
if (t == null || !t.active) return t;
@@ -623,7 +642,11 @@ namespace DG.Tweening
/// Options for Vector4 tweens
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#else
public static Tweener SetOptions(this TweenerCore t, bool snapping)
+#endif
{
if (t == null || !t.active) return t;
@@ -633,7 +656,11 @@ namespace DG.Tweening
/// Options for Vector4 tweens
/// Selecting an axis will tween the vector only on that axis, leaving the others untouched
/// If TRUE the tween will smoothly snap all values to integers
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#else
public static Tweener SetOptions(this TweenerCore t, AxisConstraint axisConstraint, bool snapping = false)
+#endif
{
if (t == null || !t.active) return t;
@@ -645,7 +672,11 @@ namespace DG.Tweening
/// Options for Quaternion tweens
/// If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
/// If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
+#else
public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
+#endif
{
if (t == null || !t.active) return t;
@@ -655,7 +686,11 @@ namespace DG.Tweening
/// Options for Color tweens
/// If TRUE only the alpha value of the color will be tweened
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool alphaOnly)
+#else
public static Tweener SetOptions(this TweenerCore t, bool alphaOnly)
+#endif
{
if (t == null || !t.active) return t;
diff --git a/_DOTween.Assembly/DOTween/Tweener.cs b/_DOTween.Assembly/DOTween/Tweener.cs
index b1ac107..af209e0 100644
--- a/_DOTween.Assembly/DOTween/Tweener.cs
+++ b/_DOTween.Assembly/DOTween/Tweener.cs
@@ -4,6 +4,9 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
+#if WP81
+using DG.Tweening.Core.Surrogates;
+#endif
using System;
using DG.Tweening.Core;
using DG.Tweening.Core.Enums;
@@ -75,37 +78,43 @@ namespace DG.Tweening
return false;
}
#else
- // WP8.1 fix tries
- if (t.tweenPlugin == null) {
- Debug.Log("Assigning plugin to ABSTweenPlugin var");
- ABSTweenPlugin plug = PluginsManager.GetDefaultPlugin();
- if (plug != null) {
- Debug.Log(">> Plugin found");
- t.tweenPlugin = plug;
- Debug.Log(">> Plugin assigned > " + t.tweenPlugin + " (t.tweenPlugin is null: " + (t.tweenPlugin == null) + ")");
- if (t.tweenPlugin == null) Debug.Log(">> Plugin assignment failed");
- } else Debug.Log(">> Plugin NOT found");
- }
- if (t.tweenPlugin == null) {
- Debug.Log("Assigning plugin to ITweenPlugin var");
- ITweenPlugin iplug = PluginsManager.GetDefaultPlugin();
- if (iplug != null) {
- Debug.Log(">> IPlugin found");
- try {
- System.Object pObj = (object)iplug;
- t.tweenPlugin = (ABSTweenPlugin)pObj;
- } catch (Exception e) {
- Debug.Log(">> Error while assigning IPlugin > " + e.Message);
- }
- Debug.Log(">> IPlugin assigned > " + t.tweenPlugin + " (t.tweenPlugin is null: " + (t.tweenPlugin == null) + ")");
- if (t.tweenPlugin == null) Debug.Log(">> IPlugin assignment failed");
- } else Debug.Log(">> IPlugin NOT found");
- }
+ if (t.tweenPlugin == null) t.tweenPlugin = PluginsManager.GetDefaultPlugin();
if (t.tweenPlugin == null) {
// No suitable plugin found. Kill
- Debugger.LogError("No suitable plugin found for this type");
+ Debugger.LogError(string.Format("No suitable plugin found for this type (<{0}, {1}, {2}>)", typeof(T1), typeof(T2), typeof(TPlugOptions)));
return false;
}
+ // WP8.1 fix tries
+// if (t.tweenPlugin == null) {
+// Debug.Log("Assigning plugin to ABSTweenPlugin var");
+// ABSTweenPlugin plug = PluginsManager.GetDefaultPlugin();
+// if (plug != null) {
+// Debug.Log(">> Plugin found");
+// t.tweenPlugin = plug;
+// Debug.Log(">> Plugin assigned > " + t.tweenPlugin + " (t.tweenPlugin is null: " + (t.tweenPlugin == null) + ")");
+// if (t.tweenPlugin == null) Debug.Log(">> Plugin assignment failed");
+// } else Debug.Log(">> Plugin NOT found");
+// }
+// if (t.tweenPlugin == null) {
+// Debug.Log("Assigning plugin to ITweenPlugin var");
+// ITweenPlugin iplug = PluginsManager.GetDefaultPlugin();
+// if (iplug != null) {
+// Debug.Log(">> IPlugin found");
+// try {
+// System.Object pObj = (object)iplug;
+// t.tweenPlugin = (ABSTweenPlugin)pObj;
+// } catch (Exception e) {
+// Debug.Log(">> Error while assigning IPlugin > " + e.Message);
+// }
+// Debug.Log(">> IPlugin assigned > " + t.tweenPlugin + " (t.tweenPlugin is null: " + (t.tweenPlugin == null) + ")");
+// if (t.tweenPlugin == null) Debug.Log(">> IPlugin assignment failed");
+// } else Debug.Log(">> IPlugin NOT found");
+// }
+// if (t.tweenPlugin == null) {
+// // No suitable plugin found. Kill
+// Debugger.LogError("No suitable plugin found for this type");
+// return false;
+// }
// WP8.1 fix tries END
#endif
}
@@ -277,7 +286,11 @@ namespace DG.Tweening
try {
switch (t.specialStartupMode) {
case SpecialStartupMode.SetLookAt:
+#if WP81
+ if (!SpecialPluginsUtils.SetLookAt(t as TweenerCore)) return false;
+#else
if (!SpecialPluginsUtils.SetLookAt(t as TweenerCore)) return false;
+#endif
break;
case SpecialStartupMode.SetPunch:
if (!SpecialPluginsUtils.SetPunch(t as TweenerCore)) return false;
diff --git a/_DOTween.Assembly/DOTween43/DOTween43.csproj b/_DOTween.Assembly/DOTween43/DOTween43.csproj
index 1edc18e..8bd78ed 100644
--- a/_DOTween.Assembly/DOTween43/DOTween43.csproj
+++ b/_DOTween.Assembly/DOTween43/DOTween43.csproj
@@ -36,7 +36,7 @@
..\bin\
- TRACE
+ TRACE;WP81
..\bin\DOTween43.xml
true
1573
diff --git a/_DOTween.Assembly/DOTween43/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween43/ShortcutExtensions.cs
index 5ad489b..10bd2e5 100644
--- a/_DOTween.Assembly/DOTween43/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween43/ShortcutExtensions.cs
@@ -46,7 +46,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMove(this Rigidbody2D target, Vector2 endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x=> target.MovePosition(x), endValue, duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, endValue, duration)
+#endif
.SetOptions(snapping).SetTarget(target);
}
@@ -56,7 +60,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMoveX(this Rigidbody2D target, float endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x => target.MovePosition(x), new Vector2(endValue, 0), duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, new Vector2(endValue, 0), duration)
+#endif
.SetOptions(AxisConstraint.X, snapping).SetTarget(target);
}
@@ -66,7 +74,11 @@ namespace DG.Tweening
/// If TRUE the tween will smoothly snap all values to integers
public static Tweener DOMoveY(this Rigidbody2D target, float endValue, float duration, bool snapping = false)
{
+#if WP81
+ return DOTween.To(() => target.position, x => target.MovePosition(x), new Vector2(0, endValue), duration)
+#else
return DOTween.To(() => target.position, target.MovePosition, new Vector2(0, endValue), duration)
+#endif
.SetOptions(AxisConstraint.Y, snapping).SetTarget(target);
}
@@ -80,5 +92,46 @@ namespace DG.Tweening
}
#endregion
+
+ #region Blendables
+
+ #region SpriteRenderer
+
+ /// Tweens a SpriteRenderer's color to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this SpriteRenderer target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ /// Tweens a SpriteRenderer's alpha BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ /// The value to tween byThe duration of the tween
+ public static Tweener DOBlendableFadeBy(this SpriteRenderer target, float byValue, float duration)
+ {
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.color += diff;
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween46/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween46/ShortcutExtensions.cs
index ed80514..05adb83 100644
--- a/_DOTween.Assembly/DOTween46/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween46/ShortcutExtensions.cs
@@ -244,5 +244,120 @@ namespace DG.Tweening
#endregion
#endregion
+
+ #region Blendables
+
+ #region Graphic
+
+ /// Tweens a Graphic's color to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Graphic as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this Graphic target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ /// Tweens a Graphic's alpha BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the Graphic as the tween's target so it can be used for filtered operations
+ /// The value to tween byThe duration of the tween
+ public static Tweener DOBlendableFadeBy(this Graphic target, float byValue, float duration)
+ {
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.color += diff;
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #region Image
+
+ /// Tweens a Image's color to the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Image as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this Image target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ /// Tweens a Image's alpha BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the Image as the tween's target so it can be used for filtered operations
+ /// The value to tween byThe duration of the tween
+ public static Tweener DOBlendableFadeBy(this Image target, float byValue, float duration)
+ {
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.color += diff;
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #region Text
+
+ /// Tweens a Text's color BY the given value,
+ /// in a way that allows other DOBlendableColor tweens to work together on the same target,
+ /// instead than fight each other as multiple DOColor would do.
+ /// Also stores the Text as the tween's target so it can be used for filtered operations
+ /// The value to tween toThe duration of the tween
+ public static Tweener DOBlendableColor(this Text target, Color endValue, float duration)
+ {
+ endValue = endValue - target.color;
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to = x;
+ target.color += diff;
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
+
+ /// Tweens a Text's alpha BY the given value (as if you chained a SetRelative),
+ /// in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ /// instead than fight each other as multiple DOFade would do.
+ /// Also stores the Text as the tween's target so it can be used for filtered operations
+ /// The value to tween byThe duration of the tween
+ public static Tweener DOBlendableFadeBy(this Text target, float byValue, float duration)
+ {
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+ Color diff = x - to;
+ to.a = x.a;
+ target.color += diff;
+ }, new Color(0, 0, 0, byValue), duration)
+ .Blendable().SetTarget(target);
+ }
+
+ #endregion
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTweenEditor/DOTweenEditor.csproj b/_DOTween.Assembly/DOTweenEditor/DOTweenEditor.csproj
index 2aa56f2..4a9fddf 100644
--- a/_DOTween.Assembly/DOTweenEditor/DOTweenEditor.csproj
+++ b/_DOTween.Assembly/DOTweenEditor/DOTweenEditor.csproj
@@ -36,7 +36,7 @@
..\bin\Editor\
- TRACE
+ TRACE;WP81
..\bin\Editor\DOTweenEditor.XML
true
1591
diff --git a/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs b/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs
index 3d93716..ed11b98 100644
--- a/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs
+++ b/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs
@@ -80,7 +80,11 @@ namespace DG.DOTweenEditor
void OnEnable()
{
+#if WP81
+ _innerTitle = "DOTween v" + DOTween.Version + (DOTween.isDebugBuild ? " [Debug WP8.1 build]" : " [Release WP8.1 build]");
+#else
_innerTitle = "DOTween v" + DOTween.Version + (DOTween.isDebugBuild ? " [Debug build]" : " [Release build]");
+#endif
if (EditorUtils.hasPro) _innerTitle += "\nDOTweenPro v" + EditorUtils.proVersion;
else _innerTitle += "\nDOTweenPro not installed";
diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index 33da8e8..8cef664 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -1183,6 +1183,45 @@
Defaults to 10, but a value of 5 is usually enough if you don't have dramatic long curves between waypoints
The color of the path (shown when gizmos are active in the Play panel and the tween is running)
+
+ Tweens a Light's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Light as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Material's named color property to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween to
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
+
+ Tweens a Material's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Material's named alpha property BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Material as the tween's target so it can be used for filtered operations
+ The value to tween by
+ The name of the material property to tween (like _Tint or _SpecColor)
+ The duration of the tween
+
Tweens a Transform's position BY the given value (as if you chained a SetRelative),
in a way that allows other DOBlendableMove tweens to work together on the same target,
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index 4d6377f..af8a899 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 817bcd8..b3c3e2a 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 58ae7f6..dd42544 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 17789d5..999a9c9 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/DOTween43.xml b/_DOTween.Assembly/bin/DOTween43.xml
index faa6a44..d571dba 100644
--- a/_DOTween.Assembly/bin/DOTween43.xml
+++ b/_DOTween.Assembly/bin/DOTween43.xml
@@ -43,5 +43,19 @@
Also stores the Rigidbody2D as the tween's target so it can be used for filtered operations
The end value to reachThe duration of the tween
+
+ Tweens a SpriteRenderer's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a SpriteRenderer's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the SpriteRenderer as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/_DOTween.Assembly/bin/DOTween46.dll b/_DOTween.Assembly/bin/DOTween46.dll
index 5d1cf36..1e1c79f 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 05b41ca..da08d52 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/DOTween46.xml b/_DOTween.Assembly/bin/DOTween46.xml
index f6ff80e..1cce00e 100644
--- a/_DOTween.Assembly/bin/DOTween46.xml
+++ b/_DOTween.Assembly/bin/DOTween46.xml
@@ -118,5 +118,47 @@
Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
Leave it to NULL (default) to use default ones
+
+ Tweens a Graphic's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Graphic's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Graphic as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Image's color to the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Image's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Image as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
+
+ Tweens a Text's color BY the given value,
+ in a way that allows other DOBlendableColor tweens to work together on the same target,
+ instead than fight each other as multiple DOColor would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween toThe duration of the tween
+
+
+ Tweens a Text's alpha BY the given value (as if you chained a SetRelative),
+ in a way that allows other DOBlendableFadeBy tweens to work together on the same target,
+ instead than fight each other as multiple DOFade would do.
+ Also stores the Text as the tween's target so it can be used for filtered operations
+ The value to tween byThe duration of the tween
+
diff --git a/_DOTween.Assembly/bin/DOTween50.dll b/_DOTween.Assembly/bin/DOTween50.dll
index 567a0c5..59be210 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 bc50b5e..36263ac 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/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll
index 718bd84..7d86250 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 b5bc434..e1618ee 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ