diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll index b35ccfb..0b2bf0c 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 89825c4..fea9f7e 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 def3904..5ffc4d8 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 6ebca49..7569079 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 b66ac09..f32075b 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 39f4c45..a8cef3e 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/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll index b35ccfb..0b2bf0c 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 89825c4..fea9f7e 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 def3904..5ffc4d8 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 6ebca49..7569079 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 b66ac09..f32075b 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 39f4c45..a8cef3e 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.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll index b35ccfb..0b2bf0c 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 89825c4..fea9f7e 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 def3904..5ffc4d8 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 6ebca49..7569079 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 b66ac09..f32075b 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 39f4c45..a8cef3e 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/_Tests PRO/Paths.cs b/UnityTests.Unity5/Assets/_Tests PRO/Paths.cs index 728f6e8..1be1e81 100644 --- a/UnityTests.Unity5/Assets/_Tests PRO/Paths.cs +++ b/UnityTests.Unity5/Assets/_Tests PRO/Paths.cs @@ -4,110 +4,5 @@ using UnityEngine; public class Paths : BrainBase { - public Ease ease = Ease.Linear; - public AxisConstraint lockPosition; - public AxisConstraint lockRotation0, lockRotation1; - public LoopType loopType = LoopType.Yoyo; - public PathMode pathMode; - public int pathResolution = 10; - public bool closePaths; - public Vector3 forward = Vector3.forward; - public Color[] pathsColors = new Color[2]; - public Transform[] targets; - - Tween controller; - - void Start() - { - // Vector3[] path = new[] { - // new Vector3(0,1,0), - // new Vector3(1,2,0), - // new Vector3(2,1,0), - // new Vector3(2,0,0) - // }; - - // TweenParams tp = new TweenParams() - // .SetEase(ease) - // .SetLoops(-1, loopType); - - // AxisConstraint lockRotation = lockRotation0 | lockRotation1; - - // // Relative VS non relative - // controller = targets[0].DOPath(path, 3, PathType.CatmullRom, pathMode, pathResolution, pathsColors[0]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(0.1f, forward) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - // targets[1].DOPath(path, 3, PathType.CatmullRom, pathMode, pathResolution, pathsColors[1]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(targets[2], forward) - // .SetAs(tp) - // .Pause(); - - // // Linear VS curved - // targets[2].DOPath(path, 3, PathType.CatmullRom, pathMode, pathResolution, pathsColors[0]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(new Vector3(3, 0, 0), forward) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - // targets[3].DOPath(path, 3, PathType.Linear, pathMode, pathResolution, pathsColors[1]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(0.1f, forward) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - - // // Linear VS curved no lookAt - // targets[4].DOPath(path, 3, PathType.CatmullRom, pathMode, pathResolution, pathsColors[0]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - // targets[5].DOPath(path, 3, PathType.Linear, pathMode, pathResolution, pathsColors[1]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - - // // Linear VS curved top-down - // path = new[] { - // new Vector3(0,0,1), - // new Vector3(1,0,2), - // new Vector3(2,0,1), - // new Vector3(2,0,0) - // }; - // targets[6].DOPath(path, 3, PathType.CatmullRom, pathMode, pathResolution, pathsColors[0]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(0.1f, forward) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - // targets[7].DOPath(path, 3, PathType.Linear, pathMode, pathResolution, pathsColors[1]) - // .SetOptions(closePaths, lockPosition, lockRotation) - // .SetLookAt(0.1f, forward) - // .SetAs(tp) - // .SetRelative() - // .Pause(); - - // // Log lengths - // controller.ForceInit(); - // Debug.Log("Controller path length: " + controller.PathLength()); - } - - void OnGUI() - { - DGUtils.BeginGUI(); - - DGUtils.GUIScrubber(controller); - - GUILayout.BeginHorizontal(); - if (GUILayout.Button("TogglePause")) DOTween.TogglePauseAll(); - if (GUILayout.Button("Goto 1.5")) DOTween.GotoAll(1.5f); - if (GUILayout.Button("Kill")) DOTween.KillAll(); - GUILayout.EndHorizontal(); - - DGUtils.EndGUI(); - } + } \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/_Tests PRO/Paths.unity b/UnityTests.Unity5/Assets/_Tests PRO/Paths.unity index 7e71a3e..1a83a78 100644 Binary files a/UnityTests.Unity5/Assets/_Tests PRO/Paths.unity and b/UnityTests.Unity5/Assets/_Tests PRO/Paths.unity differ diff --git a/UnityTests.Unity5/Assets/_Tests/TempTests.cs b/UnityTests.Unity5/Assets/_Tests/TempTests.cs index 6ddbfa1..03e2629 100644 --- a/UnityTests.Unity5/Assets/_Tests/TempTests.cs +++ b/UnityTests.Unity5/Assets/_Tests/TempTests.cs @@ -12,8 +12,14 @@ public class TempTests : BrainBase { public Transform target; - void Start() + IEnumerator Start() { - DOTween.To(()=>new Vector3(0,2,0), x=>target.position = x, new Vector3(2,4,2), 2); + yield return new WaitForSeconds(0.6f); + + Tweener t = target.DOLocalMove(new Vector3(4, 4, 0), 3); + + yield return new WaitForSeconds(0.1f); + + t.ChangeEndValue(new Vector3(0, 8, 0)); } } \ No newline at end of file diff --git a/UnityTests.Unity5/Assets/dotween_hotweenv2.png b/UnityTests.Unity5/Assets/dotween_hotweenv2.png new file mode 100644 index 0000000..7461ec5 Binary files /dev/null and b/UnityTests.Unity5/Assets/dotween_hotweenv2.png differ diff --git a/UnityTests.Unity5/Assets/dotween_hotweenv2.png.meta b/UnityTests.Unity5/Assets/dotween_hotweenv2.png.meta new file mode 100644 index 0000000..419349f --- /dev/null +++ b/UnityTests.Unity5/Assets/dotween_hotweenv2.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 3d3db7798b61f454cb36c9f158b1b48a +timeCreated: 1427192225 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs index f258dd5..f4b9f43 100644 --- a/_DOTween.Assembly/DOTween/DOTween.cs +++ b/_DOTween.Assembly/DOTween/DOTween.cs @@ -21,7 +21,7 @@ namespace DG.Tweening public class DOTween { /// DOTween's version - public static readonly string Version = "1.0.336"; + public static readonly string Version = "1.0.340"; /////////////////////////////////////////////// // Options //////////////////////////////////// diff --git a/_DOTween.Assembly/DOTween/Plugins/PathPlugin.cs b/_DOTween.Assembly/DOTween/Plugins/PathPlugin.cs index 3d190a5..508eb10 100644 --- a/_DOTween.Assembly/DOTween/Plugins/PathPlugin.cs +++ b/_DOTween.Assembly/DOTween/Plugins/PathPlugin.cs @@ -141,9 +141,14 @@ namespace DG.Tweening.Plugins lookAtP = tPos + path.wps[path.linearWPIndex] - path.wps[path.linearWPIndex - 1]; } else { float lookAheadPerc = pathPerc + options.lookAhead; - if (lookAheadPerc > 1) lookAheadPerc = (options.isClosedPath ? lookAheadPerc - 1 : 1.00001f); + if (lookAheadPerc > 1) lookAheadPerc = (options.isClosedPath ? lookAheadPerc - 1 : path.type == PathType.Linear ? 1 : 1.00001f); lookAtP = path.GetPoint(lookAheadPerc); } + if (path.type == PathType.Linear) { + // Check if it's the last waypoint, and keep correct direction + Vector3 lastWp = path.wps[path.wps.Length - 1]; + if (lookAtP == lastWp) lookAtP = tPos == lastWp ? lastWp + (lastWp - path.wps[path.wps.Length - 2]) : lastWp; + } Vector3 transUp = trans.up; // Apply basic modification for local position movement if (options.useLocalPosition && options.parent != null) lookAtP = options.parent.TransformPoint(lookAtP); diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll index b35ccfb..0b2bf0c 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 89825c4..fea9f7e 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 def3904..5ffc4d8 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 6ebca49..7569079 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 b66ac09..f32075b 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 39f4c45..a8cef3e 100644 Binary files a/_DOTween.Assembly/bin/DOTween46.dll.mdb and b/_DOTween.Assembly/bin/DOTween46.dll.mdb differ