diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
index 13907d7..9be3ec0 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
@@ -891,6 +891,14 @@
The percentage (0 to 1) at which to get the point
If TRUE constant speed is taken into account, otherwise not
+
+
+ Base interface for all tween plugins options
+
+
+
+ Resets the plugin
+
This plugin generates some GC allocations at startup
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
index fc88fcb..3fd48ca 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 b915618..3ad2b90 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 bf12f7e..88fa1a9 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 3eb88df..b89af92 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 11f8efd..c2a3582 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 7eb89bf..fbbdde0 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 ec48177..e4b063d 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 bd6c51c..c4ba379 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 fe20ac9..cf1bf76 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 998aebb..b22d6f3 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 13907d7..9be3ec0 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
@@ -891,6 +891,14 @@
The percentage (0 to 1) at which to get the point
If TRUE constant speed is taken into account, otherwise not
+
+
+ Base interface for all tween plugins options
+
+
+
+ Resets the plugin
+
This plugin generates some GC allocations at startup
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
index fc88fcb..3fd48ca 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 b915618..3ad2b90 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 bf12f7e..88fa1a9 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 3eb88df..b89af92 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 11f8efd..c2a3582 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 7eb89bf..fbbdde0 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 ec48177..e4b063d 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 bd6c51c..c4ba379 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 fe20ac9..cf1bf76 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 998aebb..b22d6f3 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 13907d7..9be3ec0 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -891,6 +891,14 @@
The percentage (0 to 1) at which to get the point
If TRUE constant speed is taken into account, otherwise not
+
+
+ Base interface for all tween plugins options
+
+
+
+ Resets the plugin
+
This plugin generates some GC allocations at startup
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index fc88fcb..3fd48ca 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 b915618..3ad2b90 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 bf12f7e..88fa1a9 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 3eb88df..b89af92 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 11f8efd..c2a3582 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 7eb89bf..fbbdde0 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 ec48177..e4b063d 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 bd6c51c..c4ba379 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 fe20ac9..cf1bf76 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 998aebb..b22d6f3 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/_DOTween.Assembly/DOTween/Core/Extensions.cs b/_DOTween.Assembly/DOTween/Core/Extensions.cs
index 45f3567..651cd27 100644
--- a/_DOTween.Assembly/DOTween/Core/Extensions.cs
+++ b/_DOTween.Assembly/DOTween/Core/Extensions.cs
@@ -5,6 +5,7 @@
// This work is subject to the terms at http://dotween.demigiant.com/license.php
using DG.Tweening.Core.Enums;
+using DG.Tweening.Plugins.Options;
namespace DG.Tweening.Core
{
@@ -22,7 +23,7 @@ namespace DG.Tweening.Core
// Prevents a tween to use a From setup even if passed
internal static TweenerCore NoFrom(this TweenerCore t)
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
t.isFromAllowed = false;
return t;
@@ -30,7 +31,7 @@ namespace DG.Tweening.Core
// Sets the tween as blendable
internal static TweenerCore Blendable(this TweenerCore t)
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
t.isBlendable = true;
return t;
diff --git a/_DOTween.Assembly/DOTween/Core/TweenManager.cs b/_DOTween.Assembly/DOTween/Core/TweenManager.cs
index 2c3568b..31d7487 100644
--- a/_DOTween.Assembly/DOTween/Core/TweenManager.cs
+++ b/_DOTween.Assembly/DOTween/Core/TweenManager.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using DG.Tweening.Core.Enums;
+using DG.Tweening.Plugins.Options;
using UnityEngine;
namespace DG.Tweening.Core
@@ -52,7 +53,7 @@ namespace DG.Tweening.Core
// Returns a new Tweener, from the pool if there's one available,
// otherwise by instantiating a new one
internal static TweenerCore GetTweener()
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
TweenerCore t;
// Search inside pool
diff --git a/_DOTween.Assembly/DOTween/Core/TweenerCore.cs b/_DOTween.Assembly/DOTween/Core/TweenerCore.cs
index a3b3085..d2b8dad 100644
--- a/_DOTween.Assembly/DOTween/Core/TweenerCore.cs
+++ b/_DOTween.Assembly/DOTween/Core/TweenerCore.cs
@@ -10,6 +10,7 @@ using DG.Tweening.Core.Surrogates;
using System;
using DG.Tweening.Core.Enums;
using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
using UnityEngine;
#pragma warning disable 1591
@@ -20,7 +21,7 @@ namespace DG.Tweening.Core
// T1: type of value to tween
// T2: format in which value is stored while tweening
// TPlugOptions: options type
- public class TweenerCore : Tweener where TPlugOptions : struct
+ public class TweenerCore : Tweener where TPlugOptions : struct, IPlugOptions
{
// SETUP DATA ////////////////////////////////////////////////
@@ -131,7 +132,8 @@ namespace DG.Tweening.Core
if (tweenPlugin != null) tweenPlugin.Reset(this);
// plugOptions = new TPlugOptions(); // Generates GC because converts to an Activator.CreateInstance
- plugOptions = Utils.InstanceCreator.Create(); // Fixes GC allocation using workaround
+// plugOptions = Utils.InstanceCreator.Create(); // Fixes GC allocation using workaround (doesn't work with IL2CPP)
+ plugOptions.Reset(); // Alternate fix that uses IPlugOptions Reset
getter = null;
setter = null;
hasManuallySetStartValue = false;
diff --git a/_DOTween.Assembly/DOTween/Core/Utils.cs b/_DOTween.Assembly/DOTween/Core/Utils.cs
index 77e88af..f3230f5 100644
--- a/_DOTween.Assembly/DOTween/Core/Utils.cs
+++ b/_DOTween.Assembly/DOTween/Core/Utils.cs
@@ -4,8 +4,6 @@
// License Copyright (c) Daniele Giardini.
// This work is subject to the terms at http://dotween.demigiant.com/license.php
-using System;
-using System.Linq.Expressions;
using UnityEngine;
namespace DG.Tweening.Core
@@ -40,11 +38,12 @@ namespace DG.Tweening.Core
// █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
// Uses code from BK > http://stackoverflow.com/a/1280832
- public class InstanceCreator where T : new()
- {
- static readonly Expression> _TExpression = () => new T();
- static readonly Func _TBuilder = _TExpression.Compile();
- public static T Create() { return _TBuilder(); }
- }
+ // (scrapped > doesn't work with IL2CPP)
+// public class InstanceCreator where T : new()
+// {
+// static readonly Expression> _TExpression = () => new T();
+// static readonly Func _TBuilder = _TExpression.Compile();
+// public static T Create() { return _TBuilder(); }
+// }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index ff08688..72f4f29 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.1.510";
+ public static readonly string Version = "1.1.520";
///////////////////////////////////////////////
// Options ////////////////////////////////////
@@ -399,7 +399,7 @@ namespace DG.Tweening
public static TweenerCore To(
ABSTweenPlugin plugin, DOGetter getter, DOSetter setter, T2 endValue, float duration
)
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{ return ApplyTo(getter, setter, endValue, duration, plugin); }
/// Tweens only one axis of a Vector3 to the given value using default plugins.
@@ -957,7 +957,7 @@ namespace DG.Tweening
static TweenerCore ApplyTo(
DOGetter getter, DOSetter setter, T2 endValue, float duration, ABSTweenPlugin plugin = null
)
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
InitCheck();
TweenerCore tweener = TweenManager.GetTweener();
diff --git a/_DOTween.Assembly/DOTween/DOTween.csproj b/_DOTween.Assembly/DOTween/DOTween.csproj
index fb4e71c..fcc9190 100644
--- a/_DOTween.Assembly/DOTween/DOTween.csproj
+++ b/_DOTween.Assembly/DOTween/DOTween.csproj
@@ -96,6 +96,7 @@
+
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/ABSTweenPlugin.cs b/_DOTween.Assembly/DOTween/Plugins/Core/ABSTweenPlugin.cs
index de9306c..4b71379 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/ABSTweenPlugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/ABSTweenPlugin.cs
@@ -6,12 +6,13 @@
using DG.Tweening.Core;
using DG.Tweening.Core.Enums;
+using DG.Tweening.Plugins.Options;
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Core
{
// Public so it can be extended by custom plugins
- public abstract class ABSTweenPlugin : ITweenPlugin where TPlugOptions : struct
+ public abstract class ABSTweenPlugin : ITweenPlugin where TPlugOptions : struct, IPlugOptions
{
public abstract void Reset(TweenerCore t); // Resets specific TweenerCore stuff, not the plugin itself
public abstract void SetFrom(TweenerCore t, bool isRelative);
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
index 40ee34c..a4ba3f2 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
@@ -30,6 +30,7 @@ using DOColorPlugin = DG.Tweening.Plugins.ColorPlugin;
using System;
using System.Collections.Generic;
using DG.Tweening.Core;
+using DG.Tweening.Plugins.Options;
using UnityEngine;
namespace DG.Tweening.Plugins.Core
@@ -61,7 +62,7 @@ namespace DG.Tweening.Plugins.Core
// ===================================================================================
// INTERNAL METHODS ------------------------------------------------------------------
- internal static ABSTweenPlugin GetDefaultPlugin() where TPlugOptions : struct
+ internal static ABSTweenPlugin GetDefaultPlugin() where TPlugOptions : struct, IPlugOptions
{
Type t1 = typeof(T1);
Type t2 = typeof(T2);
@@ -127,7 +128,7 @@ namespace DG.Tweening.Plugins.Core
// Public so it can be used by custom plugins Get method
public static ABSTweenPlugin GetCustomPlugin()
where TPlugin : ITweenPlugin, new()
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
Type t = typeof(TPlugin);
ITweenPlugin plugin;
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/ColorOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/ColorOptions.cs
index cd78c7e..6afc7e4 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/ColorOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/ColorOptions.cs
@@ -7,8 +7,13 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct ColorOptions
+ public struct ColorOptions : IPlugOptions
{
public bool alphaOnly;
+
+ public void Reset()
+ {
+ alphaOnly = false;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/FloatOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/FloatOptions.cs
index 239e6c0..f09a244 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/FloatOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/FloatOptions.cs
@@ -7,8 +7,13 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct FloatOptions
+ public struct FloatOptions : IPlugOptions
{
public bool snapping;
+
+ public void Reset()
+ {
+ snapping = false;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/IPlugOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/IPlugOptions.cs
new file mode 100644
index 0000000..f66522c
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/IPlugOptions.cs
@@ -0,0 +1,15 @@
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2016/12/08 11:50
+// License Copyright (c) Daniele Giardini
+// This work is subject to the terms at http://dotween.demigiant.com/license.php
+namespace DG.Tweening.Plugins.Options
+{
+ ///
+ /// Base interface for all tween plugins options
+ ///
+ public interface IPlugOptions
+ {
+ /// Resets the plugin
+ void Reset();
+ }
+}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/NoOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/NoOptions.cs
index 8bd411c..f2092f6 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/NoOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/NoOptions.cs
@@ -7,5 +7,8 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct NoOptions {}
+ public struct NoOptions : IPlugOptions
+ {
+ public void Reset() {}
+ }
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/PathOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/PathOptions.cs
index 2efd72f..58e5aee 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/PathOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/PathOptions.cs
@@ -17,7 +17,7 @@ namespace DG.Tweening.Plugins.Options
LookAtPosition
}
- public struct PathOptions
+ public struct PathOptions : IPlugOptions
{
public PathMode mode;
public OrientType orientType;
@@ -32,6 +32,23 @@ namespace DG.Tweening.Plugins.Options
public Transform parent; // Only used with OrientType.ToPath and useLocalPosition set as TRUE
internal Quaternion startupRot; // Used to reset orientation when rewinding
- internal float startupZRot; // Used to store Z value in case of lock Z, in order to rotate things differently
+ internal float startupZRot; // Used to store Z value in case of lock Z, in order to rotate things differently
+
+ public void Reset()
+ {
+ mode = PathMode.Ignore;
+ orientType = OrientType.None;
+ lockPositionAxis = lockRotationAxis = AxisConstraint.None;
+ isClosedPath = false;
+ lookAtPosition = Vector3.zero;
+ lookAtTransform = null;
+ lookAhead = 0;
+ hasCustomForwardDirection = false;
+ forward = Quaternion.identity;
+ useLocalPosition = false;
+ parent = null;
+ startupRot = Quaternion.identity;
+ startupZRot = 0;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/QuaternionOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/QuaternionOptions.cs
index d61b5f4..380ef10 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/QuaternionOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/QuaternionOptions.cs
@@ -9,10 +9,17 @@ using UnityEngine;
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct QuaternionOptions
+ public struct QuaternionOptions : IPlugOptions
{
internal RotateMode rotateMode;
internal AxisConstraint axisConstraint; // Used by SpecialStartupMode SetLookAt
internal Vector3 up; // Used by SpecialStartupMode SetLookAt
+
+ public void Reset()
+ {
+ rotateMode = RotateMode.Fast;
+ axisConstraint = AxisConstraint.None;
+ up = Vector3.zero;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/RectOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/RectOptions.cs
index 18b2c2c..3df095f 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/RectOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/RectOptions.cs
@@ -7,8 +7,13 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct RectOptions
+ public struct RectOptions : IPlugOptions
{
public bool snapping;
+
+ public void Reset()
+ {
+ snapping = false;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/StringOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/StringOptions.cs
index 882339b..6ae4016 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/StringOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/StringOptions.cs
@@ -7,7 +7,7 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct StringOptions
+ public struct StringOptions : IPlugOptions
{
public bool richTextEnabled;
public ScrambleMode scrambleMode;
@@ -15,5 +15,13 @@ namespace DG.Tweening.Plugins.Options
// Stored by StringPlugin
internal int startValueStrippedLength, changeValueStrippedLength; // No-tag lengths of start and change value
+
+ public void Reset()
+ {
+ richTextEnabled = false;
+ scrambleMode = ScrambleMode.None;
+ scrambledChars = null;
+ startValueStrippedLength = changeValueStrippedLength = 0;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/UintOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/UintOptions.cs
index b040aca..ac2aa57 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/UintOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/UintOptions.cs
@@ -6,8 +6,13 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct UintOptions
+ public struct UintOptions : IPlugOptions
{
public bool isNegativeChangeValue; // Necessary because uints can't obviously be negative
+
+ public void Reset()
+ {
+ isNegativeChangeValue = false;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/Vector3ArrayOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/Vector3ArrayOptions.cs
index d1c1e2b..bb9074d 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/Vector3ArrayOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/Vector3ArrayOptions.cs
@@ -7,11 +7,18 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct Vector3ArrayOptions
+ public struct Vector3ArrayOptions : IPlugOptions
{
public AxisConstraint axisConstraint;
public bool snapping;
internal float[] durations; // Duration of each segment
+
+ public void Reset()
+ {
+ axisConstraint = AxisConstraint.None;
+ snapping = false;
+ durations = null;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/Options/VectorOptions.cs b/_DOTween.Assembly/DOTween/Plugins/Options/VectorOptions.cs
index 15e78b7..d5590f8 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Options/VectorOptions.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Options/VectorOptions.cs
@@ -7,9 +7,15 @@
#pragma warning disable 1591
namespace DG.Tweening.Plugins.Options
{
- public struct VectorOptions
+ public struct VectorOptions : IPlugOptions
{
public AxisConstraint axisConstraint;
public bool snapping;
+
+ public void Reset()
+ {
+ axisConstraint = AxisConstraint.None;
+ snapping = false;
+ }
}
}
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Tweener.cs b/_DOTween.Assembly/DOTween/Tweener.cs
index d6aef42..64804e5 100644
--- a/_DOTween.Assembly/DOTween/Tweener.cs
+++ b/_DOTween.Assembly/DOTween/Tweener.cs
@@ -69,7 +69,7 @@ namespace DG.Tweening
internal static bool Setup(
TweenerCore t, DOGetter getter, DOSetter setter, T2 endValue, float duration, ABSTweenPlugin plugin = null
)
- where TPlugOptions : struct
+ where TPlugOptions : struct, IPlugOptions
{
if (plugin != null) t.tweenPlugin = plugin;
else {
@@ -99,7 +99,7 @@ namespace DG.Tweening
// CALLED BY TweenerCore
// Returns the elapsed time minus delay in case of success,
// -1 if there are missing references and the tween needs to be killed
- internal static float DoUpdateDelay(TweenerCore t, float elapsed) where TPlugOptions : struct
+ internal static float DoUpdateDelay(TweenerCore t, float elapsed) where TPlugOptions : struct, IPlugOptions
{
float tweenDelay = t.delay;
if (elapsed > tweenDelay) {
@@ -116,7 +116,7 @@ namespace DG.Tweening
// (unless it's a FROM tween, in which case it will be called BEFORE any eventual delay).
// Returns TRUE in case of success,
// FALSE if there are missing references and the tween needs to be killed
- internal static bool DoStartup(TweenerCore t) where TPlugOptions : struct
+ internal static bool DoStartup(TweenerCore t) where TPlugOptions : struct, IPlugOptions
{
t.startupDone = true;
@@ -152,7 +152,7 @@ namespace DG.Tweening
// CALLED BY TweenerCore
internal static Tweener DoChangeStartValue(
TweenerCore t, T2 newStartValue, float newDuration
- ) where TPlugOptions : struct
+ ) where TPlugOptions : struct, IPlugOptions
{
t.hasManuallySetStartValue = true;
t.startValue = newStartValue;
@@ -178,7 +178,7 @@ namespace DG.Tweening
// CALLED BY TweenerCore
internal static Tweener DoChangeEndValue(
TweenerCore t, T2 newEndValue, float newDuration, bool snapStartValue
- ) where TPlugOptions : struct
+ ) where TPlugOptions : struct, IPlugOptions
{
t.endValue = newEndValue;
t.isRelative = false;
@@ -215,7 +215,7 @@ namespace DG.Tweening
internal static Tweener DoChangeValues(
TweenerCore t, T2 newStartValue, T2 newEndValue, float newDuration
- ) where TPlugOptions : struct
+ ) where TPlugOptions : struct, IPlugOptions
{
t.hasManuallySetStartValue = true;
t.isRelative = t.isFrom = false;
@@ -243,7 +243,7 @@ namespace DG.Tweening
// Commands shared by DOStartup/ChangeStart/End/Values if the tween has already started up
// and thus some settings needs to be reapplied.
// Returns TRUE in case of SUCCESS, FALSE if there were managed errors
- static bool DOStartupSpecials(TweenerCore t) where TPlugOptions : struct
+ static bool DOStartupSpecials(TweenerCore t) where TPlugOptions : struct, IPlugOptions
{
try {
switch (t.specialStartupMode) {
@@ -262,11 +262,11 @@ namespace DG.Tweening
}
return true;
} catch {
- // Erro in SpecialPluginUtils (usually due to target being destroyed)
+ // Error in SpecialPluginUtils (usually due to target being destroyed)
return false;
}
}
- static void DOStartupDurationBased(TweenerCore t) where TPlugOptions : struct
+ static void DOStartupDurationBased(TweenerCore t) where TPlugOptions : struct, IPlugOptions
{
if (t.isSpeedBased) t.duration = t.tweenPlugin.GetSpeedBasedDuration(t.plugOptions, t.duration, t.changeValue);
t.fullDuration = t.loops > -1 ? t.duration * t.loops : Mathf.Infinity;
diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index 13907d7..9be3ec0 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -891,6 +891,14 @@
The percentage (0 to 1) at which to get the point
If TRUE constant speed is taken into account, otherwise not
+
+
+ Base interface for all tween plugins options
+
+
+
+ Resets the plugin
+
This plugin generates some GC allocations at startup
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index fc88fcb..3fd48ca 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 b915618..3ad2b90 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 bf12f7e..88fa1a9 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 3eb88df..b89af92 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 11f8efd..c2a3582 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 7eb89bf..fbbdde0 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 ec48177..e4b063d 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 bd6c51c..c4ba379 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 fe20ac9..cf1bf76 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 998aebb..b22d6f3 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ