diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
index 6acf127..e40dddf 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -1382,6 +1382,13 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's named color property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a Material's alpha color to the given value
(will have no effect unless your material supports transparency).
@@ -1396,6 +1403,14 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's alpha color with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ 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
@@ -1403,6 +1418,13 @@
The name of the material property to tween
The duration of the tween
+
+ Tweens a Material's named float property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a Material's texture offset to the given value.
Also stores the material as the tween's target so it can be used for filtered operations
@@ -1436,6 +1458,13 @@
The name of the material property to tween
The duration of the tween
+
+ Tweens a Material's named Vector property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a TrailRenderer's startWidth/endWidth to the given value.
Also stores the TrailRenderer as the tween's target so it can be used for filtered operations
@@ -1730,6 +1759,15 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's named color property with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ 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 6dd503b..eab2805 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 de70bb5..8b4271c 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/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 43e998d..7077053 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 ba4be61..7f803a2 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll
index 1c2b1cd..a895291 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb
index d4d131b..87ea8dd 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs b/UnityTests.Unity5/Assets/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs
index 26c4a69..caede5e 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/Modules/DOTweenModuleUnityVersion.cs
@@ -72,7 +72,9 @@ namespace DG.Tweening
#endif
#if UNITY_5_3_OR_NEWER || UNITY_2017_1_OR_NEWER
- #region CustomYieldInstructions (Unity 5.3 or Newer)
+ #region Unity 5.3 or Newer
+
+ #region CustomYieldInstructions
///
/// Returns a that waits until the tween is killed or complete.
@@ -162,6 +164,46 @@ namespace DG.Tweening
}
#endregion
+
+ #endregion
+#endif
+
+#if UNITY_2018_1_OR_NEWER
+ #region Unity 2018.1 or Newer
+
+ #region Material
+
+ /// Tweens a Material's named texture offset property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOOffset(this Material target, Vector2 endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetTextureOffset(propertyID), x => target.SetTextureOffset(propertyID, x), endValue, duration).SetTarget(target);
+ }
+
+ /// Tweens a Material's named texture scale property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOTiling(this Material target, Vector2 endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetTextureScale(propertyID), x => target.SetTextureScale(propertyID, x), endValue, duration).SetTarget(target);
+ }
+
+ #endregion
+
+ #endregion
#endif
}
diff --git a/_DOTween.Assembly/DOTween/Core/Debugger.cs b/_DOTween.Assembly/DOTween/Core/Debugger.cs
index b270f07..34b1e96 100644
--- a/_DOTween.Assembly/DOTween/Core/Debugger.cs
+++ b/_DOTween.Assembly/DOTween/Core/Debugger.cs
@@ -66,6 +66,10 @@ namespace DG.Tweening.Core
{
LogWarning(string.Format("This material doesn't have a {0} property", propertyName));
}
+ public static void LogMissingMaterialProperty(int propertyId)
+ {
+ LogWarning(string.Format("This material doesn't have a {0} property ID", propertyId));
+ }
public static void LogRemoveActiveTweenError(string errorInfo)
{
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index 255d9eb..36a814a 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.2.170"; // Last version before modules: 1.1.755
+ public static readonly string Version = "1.2.175"; // Last version before modules: 1.1.755
///////////////////////////////////////////////
// Options ////////////////////////////////////
diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
index 7a7e0f9..d078bb9 100644
--- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
@@ -234,6 +234,19 @@ namespace DG.Tweening
}
return DOTween.To(() => target.GetColor(property), x => target.SetColor(property, x), endValue, duration).SetTarget(target);
}
+ /// Tweens a Material's named color property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOColor(this Material target, Color endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetColor(propertyID), x => target.SetColor(propertyID, x), endValue, duration).SetTarget(target);
+ }
/// Tweens a Material's alpha color to the given value
/// (will have no effect unless your material supports transparency).
@@ -258,6 +271,20 @@ namespace DG.Tweening
}
return DOTween.ToAlpha(() => target.GetColor(property), x => target.SetColor(property, x), endValue, duration).SetTarget(target);
}
+ /// Tweens a Material's alpha color with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOFade(this Material target, float endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.ToAlpha(() => target.GetColor(propertyID), x => target.SetColor(propertyID, x), endValue, duration).SetTarget(target);
+ }
/// 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
@@ -272,6 +299,19 @@ namespace DG.Tweening
}
return DOTween.To(() => target.GetFloat(property), x => target.SetFloat(property, x), endValue, duration).SetTarget(target);
}
+ /// Tweens a Material's named float property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOFloat(this Material target, float endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetFloat(propertyID), x => target.SetFloat(propertyID, x), endValue, duration).SetTarget(target);
+ }
/// Tweens a Material's texture offset to the given value.
/// Also stores the material as the tween's target so it can be used for filtered operations
@@ -330,6 +370,19 @@ namespace DG.Tweening
}
return DOTween.To(() => target.GetVector(property), x => target.SetVector(property, x), endValue, duration).SetTarget(target);
}
+ /// Tweens a Material's named Vector property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOVector(this Material target, Vector4 endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetVector(propertyID), x => target.SetVector(propertyID, x), endValue, duration).SetTarget(target);
+ }
#endregion
@@ -980,6 +1033,33 @@ namespace DG.Tweening
}, endValue, duration)
.Blendable().SetTarget(target);
}
+ /// Tweens a Material's named color property with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOBlendableColor(this Material target, Color endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+
+ endValue = endValue - target.GetColor(propertyID);
+ Color to = new Color(0, 0, 0, 0);
+ return DOTween.To(() => to, x => {
+#if COMPATIBLE
+ Color diff = x.value - to;
+#else
+ Color diff = x - to;
+#endif
+ to = x;
+ target.SetColor(propertyID, target.GetColor(propertyID) + diff);
+ }, endValue, duration)
+ .Blendable().SetTarget(target);
+ }
#endregion
diff --git a/_DOTween.Assembly/DOTween_LooseScripts/DOTween_LooseScripts.csproj b/_DOTween.Assembly/DOTween_LooseScripts/DOTween_LooseScripts.csproj
index 6909350..1258272 100644
--- a/_DOTween.Assembly/DOTween_LooseScripts/DOTween_LooseScripts.csproj
+++ b/_DOTween.Assembly/DOTween_LooseScripts/DOTween_LooseScripts.csproj
@@ -30,7 +30,7 @@
pdbonly
true
..\bin\
- TRACE;UNITY_EDITOR;UNITY_4_3;UNITY_4_6;UNITY_5;UNITY_2017_1_OR_NEWER
+ TRACE;UNITY_EDITOR;UNITY_4_3;UNITY_4_6;UNITY_5;UNITY_2017_1_OR_NEWER;UNITY_2018_1_OR_NEWER
prompt
4
diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index 6acf127..e40dddf 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -1382,6 +1382,13 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's named color property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a Material's alpha color to the given value
(will have no effect unless your material supports transparency).
@@ -1396,6 +1403,14 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's alpha color with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ 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
@@ -1403,6 +1418,13 @@
The name of the material property to tween
The duration of the tween
+
+ Tweens a Material's named float property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a Material's texture offset to the given value.
Also stores the material as the tween's target so it can be used for filtered operations
@@ -1436,6 +1458,13 @@
The name of the material property to tween
The duration of the tween
+
+ Tweens a Material's named Vector property with the given ID to the given value.
+ Also stores the material as the tween's target so it can be used for filtered operations
+ The end value to reach
+ The ID of the material property to tween (also called nameID in Unity's manual)
+ The duration of the tween
+
Tweens a TrailRenderer's startWidth/endWidth to the given value.
Also stores the TrailRenderer as the tween's target so it can be used for filtered operations
@@ -1730,6 +1759,15 @@
The name of the material property to tween (like _Tint or _SpecColor)
The duration of the tween
+
+ Tweens a Material's named color property with the given ID 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 ID of the material property to tween (also called nameID in Unity's manual)
+ 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 6dd503b..eab2805 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 de70bb5..8b4271c 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/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll
index 43e998d..7077053 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 ba4be61..7f803a2 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll
index 1c2b1cd..a895291 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb
index d4d131b..87ea8dd 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenUpgradeManager.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/Modules/DOTweenModuleUnityVersion.cs b/_DOTween.Assembly/bin/Modules/DOTweenModuleUnityVersion.cs
index 26c4a69..caede5e 100644
--- a/_DOTween.Assembly/bin/Modules/DOTweenModuleUnityVersion.cs
+++ b/_DOTween.Assembly/bin/Modules/DOTweenModuleUnityVersion.cs
@@ -72,7 +72,9 @@ namespace DG.Tweening
#endif
#if UNITY_5_3_OR_NEWER || UNITY_2017_1_OR_NEWER
- #region CustomYieldInstructions (Unity 5.3 or Newer)
+ #region Unity 5.3 or Newer
+
+ #region CustomYieldInstructions
///
/// Returns a that waits until the tween is killed or complete.
@@ -162,6 +164,46 @@ namespace DG.Tweening
}
#endregion
+
+ #endregion
+#endif
+
+#if UNITY_2018_1_OR_NEWER
+ #region Unity 2018.1 or Newer
+
+ #region Material
+
+ /// Tweens a Material's named texture offset property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOOffset(this Material target, Vector2 endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetTextureOffset(propertyID), x => target.SetTextureOffset(propertyID, x), endValue, duration).SetTarget(target);
+ }
+
+ /// Tweens a Material's named texture scale property with the given ID to the given value.
+ /// Also stores the material as the tween's target so it can be used for filtered operations
+ /// The end value to reach
+ /// The ID of the material property to tween (also called nameID in Unity's manual)
+ /// The duration of the tween
+ public static Tweener DOTiling(this Material target, Vector2 endValue, int propertyID, float duration)
+ {
+ if (!target.HasProperty(propertyID)) {
+ if (Debugger.logPriority > 0) Debugger.LogMissingMaterialProperty(propertyID);
+ return null;
+ }
+ return DOTween.To(() => target.GetTextureScale(propertyID), x => target.SetTextureScale(propertyID, x), endValue, duration).SetTarget(target);
+ }
+
+ #endregion
+
+ #endregion
#endif
}