diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
index b551cd8..4a51052 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
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 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
@@ -1520,7 +1520,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
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
index 27549cd..38b40e3 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 a5f7e7b..0eff397 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 496f57f..3577443 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 1184125..5fae66f 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll
index 1b1ae48..6dc9a7c 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 76580a0..a956b93 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll
index 0c30bd3..986d4f0 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 8aad6e2..447a188 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 2410e86..197383d 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 c00bd97..9d2ccb4 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 b551cd8..4a51052 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
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 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
@@ -1520,7 +1520,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
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
index 27549cd..38b40e3 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 a5f7e7b..0eff397 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 496f57f..3577443 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 1184125..5fae66f 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
index 1b1ae48..6dc9a7c 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 76580a0..a956b93 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
index 0c30bd3..986d4f0 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 8aad6e2..447a188 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 2410e86..197383d 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 c00bd97..9d2ccb4 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 b551cd8..4a51052 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
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 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
@@ -1520,7 +1520,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
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index 27549cd..38b40e3 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 a5f7e7b..0eff397 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 496f57f..3577443 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 1184125..5fae66f 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
index 1b1ae48..6dc9a7c 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 76580a0..a956b93 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
index 0c30bd3..986d4f0 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 8aad6e2..447a188 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 2410e86..197383d 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 c00bd97..9d2ccb4 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/_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/Bugs/Temp.cs b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
index d71e1f1..2bfe7ec 100644
--- a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
+++ b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.cs
@@ -7,10 +7,22 @@ public class Temp : BrainBase
{
public RotateMode rotMode;
public Transform target;
+ Sequence s;
IEnumerator Start()
{
yield return new WaitForSeconds(0.6f);
- target.DORotate(new Vector3(0,0,20f), 3f, rotMode).SetRelative();
+ s = DOTween.Sequence();
+ s.Insert(0.5f, target.DORotate(new Vector3(0,0,90f), 1f, rotMode).SetRelative());
+ s.Insert(1.5f, target.DORotate(new Vector3(0,90,0f), 1f, rotMode).SetRelative());
+ s.Insert(0.8f, target.DOMoveX(4, 1).SetRelative());
+ s.Insert(2f, target.DOMoveY(4, 1).SetRelative());
+ s.Pause();
+ }
+
+ void OnGUI()
+ {
+ if (GUILayout.Button("Play")) s.Play();
+ if (GUILayout.Button("Goto 2.5")) s.Goto(2.5f);
}
}
\ 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 5bbe023..ab7933b 100644
Binary files a/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity and b/UnityTests.Unity5/Assets/_Tests/Bugs/Temp.unity differ
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/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index 78f31dc..6351003 100644
--- a/_DOTween.Assembly/DOTween/DOTween.cs
+++ b/_DOTween.Assembly/DOTween/DOTween.cs
@@ -24,7 +24,7 @@ namespace DG.Tweening
public class DOTween
{
/// DOTween's version
- public static readonly string Version = "1.0.520";
+ public static readonly string Version = "1.0.521";
///////////////////////////////////////////////
// Options ////////////////////////////////////
@@ -347,8 +347,8 @@ namespace DG.Tweening
/// 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); }
+ 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); }
diff --git a/_DOTween.Assembly/DOTween/DOTween.csproj b/_DOTween.Assembly/DOTween/DOTween.csproj
index f851ab3..2518fcf 100644
--- a/_DOTween.Assembly/DOTween/DOTween.csproj
+++ b/_DOTween.Assembly/DOTween/DOTween.csproj
@@ -72,6 +72,7 @@
+
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
index 5f51658..d0dc97d 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
@@ -64,17 +64,23 @@ namespace DG.Tweening.Plugins.Core
}
}
#endif
- else if (t1 == typeof(Quaternion)) {
+#if WP81
+ else if (t1 == typeof(QuaternionSurrogate)) {
if (t2 == typeof(Quaternion)) Debugger.LogError("Quaternion tweens require a Vector3 endValue");
else {
-#if WP81
if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionSurrogatePlugin();
-#else
- if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionPlugin();
-#endif
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;
+ }
+ }
+#endif
#if WP81
else if (t1 == typeof(Vector2Surrogate)) {
if (_vector2Plugin == null) _vector2Plugin = new Vector2SurrogatePlugin();
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs b/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
index 91499e6..797fee5 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/SpecialPluginsUtils.cs
@@ -5,6 +5,7 @@
// This work is subject to the terms at http://dotween.demigiant.com/license.php
using DG.Tweening.Core;
+using DG.Tweening.Core.Surrogates;
using DG.Tweening.Plugins.Options;
using UnityEngine;
@@ -14,7 +15,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/QuaternionSurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
index 81685bc..63c4ee6 100644
--- a/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
@@ -12,41 +12,41 @@ using UnityEngine;
#pragma warning disable 1591
namespace DG.Tweening.Plugins
{
- public class QuaternionSurrogatePlugin : ABSTweenPlugin
+ public class QuaternionSurrogatePlugin : ABSTweenPlugin
{
- public override void Reset(TweenerCore t) { }
+ public override void Reset(TweenerCore t) { }
- public override void SetFrom(TweenerCore t, bool isRelative)
+ public override void SetFrom(TweenerCore t, bool isRelative)
{
Vector3Surrogate prevEndVal = t.endValue;
- t.endValue = t.getter().eulerAngles;
+ 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 {
- Quaternion rot = t.getter();
+ QuaternionSurrogate rot = t.getter();
if (t.plugOptions.rotateMode == RotateMode.WorldAxisAdd) {
- t.startValue = (rot * Quaternion.Inverse(rot) * Quaternion.Euler(prevEndVal) * rot).eulerAngles;
+ t.startValue = ((Quaternion)rot * Quaternion.Inverse(rot) * Quaternion.Euler(prevEndVal) * (Quaternion)rot).eulerAngles;
} else {
- t.startValue = (rot * Quaternion.Euler(prevEndVal)).eulerAngles;
+ t.startValue = ((Quaternion)rot * Quaternion.Euler(prevEndVal)).eulerAngles;
}
t.endValue = -prevEndVal;
}
t.setter(Quaternion.Euler(t.startValue));
}
- public override Vector3Surrogate ConvertToStartValue(TweenerCore t, Quaternion value)
+ public override Vector3Surrogate ConvertToStartValue(TweenerCore t, QuaternionSurrogate value)
{
- return value.eulerAngles;
+ return ((Quaternion)value).eulerAngles;
}
- public override void SetRelativeEndValue(TweenerCore t)
+ public override void SetRelativeEndValue(TweenerCore t)
{
t.endValue += t.startValue;
}
- public override void SetChangeValue(TweenerCore t)
+ 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
@@ -77,7 +77,7 @@ namespace DG.Tweening.Plugins
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)
+ 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;
@@ -91,12 +91,12 @@ namespace DG.Tweening.Plugins
switch (options.rotateMode) {
case RotateMode.WorldAxisAdd:
case RotateMode.LocalAxisAdd:
- Quaternion startRot = Quaternion.Euler(startValue); // Reset rotation
+ 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(startRot * Quaternion.Inverse(startRot) * Quaternion.Euler(endValue) * startRot);
- else setter(startRot * Quaternion.Euler(endValue));
+ 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;
diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
index cbcab31..fb89713 100644
--- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
@@ -295,7 +295,7 @@ namespace DG.Tweening
public static Tweener DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
#if WP81
- TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration);
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.MoveRotation(x), endValue, duration);
#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration);
#endif
@@ -312,7 +312,7 @@ namespace DG.Tweening
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, target.MoveRotation, towards, duration)
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.MoveRotation(x), towards, duration)
#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, towards, duration)
#endif
@@ -439,7 +439,7 @@ namespace DG.Tweening
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);
+ 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
@@ -455,7 +455,7 @@ namespace DG.Tweening
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);
+ 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
@@ -519,7 +519,7 @@ namespace DG.Tweening
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)
+ 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
@@ -767,11 +767,11 @@ namespace DG.Tweening
{
Quaternion to = target.rotation;
#if WP81
- TweenerCore t = DOTween.To(() => to, x => {
+ TweenerCore t = DOTween.To(() => to, x => {
#else
TweenerCore t = DOTween.To(() => to, x => {
#endif
- Quaternion diff = x * Quaternion.Inverse(to);
+ Quaternion diff = (Quaternion)x * Quaternion.Inverse(to);
to = x;
target.rotation = target.rotation * Quaternion.Inverse(target.rotation) * diff * target.rotation;
}, byValue, duration)
@@ -790,11 +790,11 @@ namespace DG.Tweening
{
Quaternion to = target.localRotation;
#if WP81
- TweenerCore t = DOTween.To(() => to, x => {
+ TweenerCore t = DOTween.To(() => to, x => {
#else
TweenerCore t = DOTween.To(() => to, x => {
#endif
- Quaternion diff = x * Quaternion.Inverse(to);
+ Quaternion diff = (Quaternion)x * Quaternion.Inverse(to);
to = x;
target.localRotation = target.localRotation * Quaternion.Inverse(target.localRotation) * diff * target.localRotation;
}, byValue, duration)
diff --git a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
index 3ca9584..be23263 100644
--- a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
+++ b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
@@ -673,7 +673,7 @@ namespace DG.Tweening
/// 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)
+ public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
#else
public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
#endif
diff --git a/_DOTween.Assembly/DOTween/Tweener.cs b/_DOTween.Assembly/DOTween/Tweener.cs
index 04c488e..24562be 100644
--- a/_DOTween.Assembly/DOTween/Tweener.cs
+++ b/_DOTween.Assembly/DOTween/Tweener.cs
@@ -7,6 +7,7 @@
using System;
using DG.Tweening.Core;
using DG.Tweening.Core.Enums;
+using DG.Tweening.Core.Surrogates;
using DG.Tweening.Plugins.Core;
using DG.Tweening.Plugins.Options;
using UnityEngine;
@@ -283,7 +284,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/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index b551cd8..4a51052 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -565,7 +565,7 @@
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 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
@@ -1520,7 +1520,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
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index 27549cd..38b40e3 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 a5f7e7b..0eff397 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 496f57f..3577443 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 1184125..5fae66f 100644
Binary files a/_DOTween.Assembly/bin/DOTween43.dll.mdb and b/_DOTween.Assembly/bin/DOTween43.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/DOTween46.dll b/_DOTween.Assembly/bin/DOTween46.dll
index 1b1ae48..6dc9a7c 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 76580a0..a956b93 100644
Binary files a/_DOTween.Assembly/bin/DOTween46.dll.mdb and b/_DOTween.Assembly/bin/DOTween46.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/DOTween50.dll b/_DOTween.Assembly/bin/DOTween50.dll
index 0c30bd3..986d4f0 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 8aad6e2..447a188 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 2410e86..197383d 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 c00bd97..9d2ccb4 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ