diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
index d416480..1b80d12 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
@@ -785,16 +785,28 @@
- Returns a point on a path based on the given path percentage
- (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized)
+ Returns a point on a path based on the given path percentage.
+ Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
Percentage of the path (0 to 1) on which to get the point
+
+
+ Returns an array of points that can be used to draw the path.
+ Note that this method generates allocations, because it creates a new array.
+ Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
+ A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
+ You can force a path to be initialized by calling myTween.ForceInit().
+
+ How many points to create for each path segment (waypoint to waypoint).
+ Only used in case of non-Linear paths
+
- Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
+ Returns the length of a path.
+ Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
index 7fff749..93cdb2e 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 711857a..9776072 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/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
index d416480..1b80d12 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
@@ -785,16 +785,28 @@
- Returns a point on a path based on the given path percentage
- (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized)
+ Returns a point on a path based on the given path percentage.
+ Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
Percentage of the path (0 to 1) on which to get the point
+
+
+ Returns an array of points that can be used to draw the path.
+ Note that this method generates allocations, because it creates a new array.
+ Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
+ A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
+ You can force a path to be initialized by calling myTween.ForceInit().
+
+ How many points to create for each path segment (waypoint to waypoint).
+ Only used in case of non-Linear paths
+
- Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
+ Returns the length of a path.
+ Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
index 7fff749..93cdb2e 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 711857a..9776072 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.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
index d416480..1b80d12 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -785,16 +785,28 @@
- Returns a point on a path based on the given path percentage
- (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized)
+ Returns a point on a path based on the given path percentage.
+ Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
Percentage of the path (0 to 1) on which to get the point
+
+
+ Returns an array of points that can be used to draw the path.
+ Note that this method generates allocations, because it creates a new array.
+ Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
+ A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
+ You can force a path to be initialized by calling myTween.ForceInit().
+
+ How many points to create for each path segment (waypoint to waypoint).
+ Only used in case of non-Linear paths
+
- Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
+ Returns the length of a path.
+ Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index 7fff749..93cdb2e 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 711857a..9776072 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/_Tests PRO/PathsWDrawPaths.cs b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.cs
new file mode 100644
index 0000000..757089c
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.cs
@@ -0,0 +1,27 @@
+using UnityEngine;
+using System.Collections;
+using DG.Tweening;
+
+public class PathsWDrawPaths : MonoBehaviour
+{
+ public DOTweenPath path;
+ public int subdivisionsXSegment = 10;
+ public Color startColor = Color.white;
+ public Color endColor = Color.white;
+ public float startW = 1;
+ public float endW = 1;
+ public Material material;
+
+ void Start()
+ {
+ Vector3[] drawPoints = path.GetTween().PathGetDrawPoints(subdivisionsXSegment);
+
+ int pointsCount = drawPoints.Length;
+ LineRenderer lr = path.gameObject.AddComponent();
+ lr.material = material;
+ lr.SetColors(startColor, endColor);
+ lr.SetWidth(startW, endW);
+ lr.SetVertexCount(pointsCount);
+ for (int i = 0; i < pointsCount; ++i) lr.SetPosition(i, drawPoints[i]);
+ }
+}
\ No newline at end of file
diff --git a/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.cs.meta b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.cs.meta
new file mode 100644
index 0000000..3b230f1
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b8412d3159b7e4f41a52d0726d03859f
+timeCreated: 1432984650
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity
new file mode 100644
index 0000000..417073d
Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity differ
diff --git a/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity.meta b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity.meta
new file mode 100644
index 0000000..254f12b
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests PRO/PathsWDrawPaths.unity.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 78b42a9711be35745a01f7ef360f60c0
+timeCreated: 1432984644
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat
new file mode 100644
index 0000000..7088f33
Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat differ
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat.meta
new file mode 100644
index 0000000..871bfe6
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/LineRenderer MAT.mat.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: caadc059b8b98a845adf07082f904d83
+timeCreated: 1432985499
+licenseType: Free
+NativeFormatImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png
new file mode 100644
index 0000000..d0d1d8a
Binary files /dev/null and b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png differ
diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png.meta b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png.meta
new file mode 100644
index 0000000..ec2cfdd
--- /dev/null
+++ b/UnityTests.Unity5/Assets/_Tests/_Shared Materials/TEX Particle Strong.png.meta
@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: 9a032d2a2a862fb4e8d9a4acd8cf0093
+timeCreated: 1432985686
+licenseType: Free
+TextureImporter:
+ fileIDToRecycleName: {}
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ 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: 128
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ rGBM: 0
+ compressionQuality: 50
+ spriteMode: 0
+ 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: -1
+ buildTargetSettings: []
+ spriteSheet:
+ sprites: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index e7833e2..fe3622d 100644
--- a/_DOTween.Assembly/DOTween/DOTween.cs
+++ b/_DOTween.Assembly/DOTween/DOTween.cs
@@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// DOTween's version
- public static readonly string Version = "1.0.750";
+ public static readonly string Version = "1.0.755";
///////////////////////////////////////////////
// Options ////////////////////////////////////
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/PathCore/Path.cs b/_DOTween.Assembly/DOTween/Plugins/Core/PathCore/Path.cs
index 2996ff1..3059bdb 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/PathCore/Path.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/PathCore/Path.cs
@@ -138,6 +138,23 @@ namespace DG.Tweening.Plugins.Core.PathCore
return 0;
}
+ // USED EXTERNALLY, to output a series of points that can be used to draw the path outside of DOTween
+ // (called by TweenExtensions.PathGetDrawPoints)
+ internal static Vector3[] GetDrawPoints(Path p, int drawSubdivisionsXSegment)
+ {
+ int wpsCount = p.wps.Length;
+ if (p.type == PathType.Linear) return p.wps;
+
+ int gizmosSubdivisions = wpsCount * drawSubdivisionsXSegment;
+ Vector3[] drawPoints = new Vector3[gizmosSubdivisions + 1];
+ for (int i = 0; i <= gizmosSubdivisions; ++i) {
+ float perc = i / (float)gizmosSubdivisions;
+ Vector3 wp = p.GetPoint(perc);
+ drawPoints[i] = wp;
+ }
+ return drawPoints;
+ }
+
// Refreshes the waypoints used to draw non-linear gizmos and the PathInspector scene view.
// Called by Draw method or by DOTweenPathInspector
internal static void RefreshNonLinearDrawWps(Path p)
diff --git a/_DOTween.Assembly/DOTween/TweenExtensions.cs b/_DOTween.Assembly/DOTween/TweenExtensions.cs
index fed1ed9..7c47dc7 100644
--- a/_DOTween.Assembly/DOTween/TweenExtensions.cs
+++ b/_DOTween.Assembly/DOTween/TweenExtensions.cs
@@ -493,8 +493,8 @@ namespace DG.Tweening
#region Path Tweens
///
- /// Returns a point on a path based on the given path percentage
- /// (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized)
+ /// Returns a point on a path based on the given path percentage.
+ /// Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
/// A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
/// You can force a path to be initialized by calling myTween.ForceInit().
///
@@ -523,7 +523,37 @@ namespace DG.Tweening
}
///
- /// Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
+ /// Returns an array of points that can be used to draw the path.
+ /// Note that this method generates allocations, because it creates a new array.
+ /// Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
+ /// A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
+ /// You can force a path to be initialized by calling myTween.ForceInit().
+ ///
+ /// How many points to create for each path segment (waypoint to waypoint).
+ /// Only used in case of non-Linear paths
+ public static Vector3[] PathGetDrawPoints(this Tween t, int subdivisionsXSegment = 10)
+ {
+ if (t == null) {
+ if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return null;
+ } else if (!t.active) {
+ if (Debugger.logPriority > 1) Debugger.LogInvalidTween(t); return null;
+ } else if (t.isSequenced) {
+ if (Debugger.logPriority > 1) Debugger.LogNestedTween(t); return null;
+ }
+
+ TweenerCore pathTween = t as TweenerCore;
+ if (pathTween == null) {
+ if (Debugger.logPriority > 1) Debugger.LogNonPathTween(t); return null;
+ } else if (!pathTween.endValue.isFinalized) {
+ if (Debugger.logPriority > 1) Debugger.LogWarning("The path is not finalized yet"); return null;
+ }
+
+ return Path.GetDrawPoints(pathTween.endValue, subdivisionsXSegment);
+ }
+
+ ///
+ /// Returns the length of a path.
+ /// Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
/// A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
/// You can force a path to be initialized by calling myTween.ForceInit().
///
diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index d416480..1b80d12 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -785,16 +785,28 @@
- Returns a point on a path based on the given path percentage
- (returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized)
+ Returns a point on a path based on the given path percentage.
+ Returns Vector3.zero if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
Percentage of the path (0 to 1) on which to get the point
+
+
+ Returns an array of points that can be used to draw the path.
+ Note that this method generates allocations, because it creates a new array.
+ Returns NULL if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
+ A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
+ You can force a path to be initialized by calling myTween.ForceInit().
+
+ How many points to create for each path segment (waypoint to waypoint).
+ Only used in case of non-Linear paths
+
- Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
+ Returns the length of a path.
+ Returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized.
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling myTween.ForceInit().
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index 7fff749..93cdb2e 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 711857a..9776072 100644
Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ