mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 09:16:02 +08:00
Added new setting for maxSmoothUnscaledTime
This commit is contained in:
parent
bcebcb0c8f
commit
0163e246a4
@ -250,7 +250,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
||||||
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
||||||
(unless they're set as timeScaleIndependent, in which case this setting will be ignored).
|
(unless they're set as timeScaleIndependent, in which case a value between the last timestep
|
||||||
|
and <see cref="F:DG.Tweening.DOTween.maxSmoothUnscaledTime"/> will be used instead).
|
||||||
|
Setting this to TRUE will lead to smoother animations.
|
||||||
|
<para>Default: FALSE</para></summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:DG.Tweening.DOTween.maxSmoothUnscaledTime">
|
||||||
|
<summary>If <see cref="F:DG.Tweening.DOTween.useSmoothDeltaTime"/> is TRUE, this indicates the max timeStep that an independent update call can last.
|
||||||
Setting this to TRUE will lead to smoother animations.
|
Setting this to TRUE will lead to smoother animations.
|
||||||
<para>Default: FALSE</para></summary>
|
<para>Default: FALSE</para></summary>
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -250,7 +250,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
||||||
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
||||||
(unless they're set as timeScaleIndependent, in which case this setting will be ignored).
|
(unless they're set as timeScaleIndependent, in which case a value between the last timestep
|
||||||
|
and <see cref="F:DG.Tweening.DOTween.maxSmoothUnscaledTime"/> will be used instead).
|
||||||
|
Setting this to TRUE will lead to smoother animations.
|
||||||
|
<para>Default: FALSE</para></summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:DG.Tweening.DOTween.maxSmoothUnscaledTime">
|
||||||
|
<summary>If <see cref="F:DG.Tweening.DOTween.useSmoothDeltaTime"/> is TRUE, this indicates the max timeStep that an independent update call can last.
|
||||||
Setting this to TRUE will lead to smoother animations.
|
Setting this to TRUE will lead to smoother animations.
|
||||||
<para>Default: FALSE</para></summary>
|
<para>Default: FALSE</para></summary>
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -250,7 +250,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
||||||
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
||||||
(unless they're set as timeScaleIndependent, in which case this setting will be ignored).
|
(unless they're set as timeScaleIndependent, in which case a value between the last timestep
|
||||||
|
and <see cref="F:DG.Tweening.DOTween.maxSmoothUnscaledTime"/> will be used instead).
|
||||||
|
Setting this to TRUE will lead to smoother animations.
|
||||||
|
<para>Default: FALSE</para></summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:DG.Tweening.DOTween.maxSmoothUnscaledTime">
|
||||||
|
<summary>If <see cref="F:DG.Tweening.DOTween.useSmoothDeltaTime"/> is TRUE, this indicates the max timeStep that an independent update call can last.
|
||||||
Setting this to TRUE will lead to smoother animations.
|
Setting this to TRUE will lead to smoother animations.
|
||||||
<para>Default: FALSE</para></summary>
|
<para>Default: FALSE</para></summary>
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -46,6 +46,7 @@ namespace DG.Tweening.Core
|
|||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
_unscaledDeltaTime = Time.realtimeSinceStartup - _unscaledTime;
|
_unscaledDeltaTime = Time.realtimeSinceStartup - _unscaledTime;
|
||||||
|
if (DOTween.useSmoothDeltaTime && _unscaledDeltaTime > DOTween.maxSmoothUnscaledTime) _unscaledDeltaTime = DOTween.maxSmoothUnscaledTime;
|
||||||
if (TweenManager.hasActiveDefaultTweens) {
|
if (TweenManager.hasActiveDefaultTweens) {
|
||||||
TweenManager.Update(UpdateType.Normal, (DOTween.useSmoothDeltaTime ? Time.smoothDeltaTime : Time.deltaTime) * DOTween.timeScale, _unscaledDeltaTime * DOTween.timeScale);
|
TweenManager.Update(UpdateType.Normal, (DOTween.useSmoothDeltaTime ? Time.smoothDeltaTime : Time.deltaTime) * DOTween.timeScale, _unscaledDeltaTime * DOTween.timeScale);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace DG.Tweening.Core
|
|||||||
public bool useSafeMode = true;
|
public bool useSafeMode = true;
|
||||||
public float timeScale = 1;
|
public float timeScale = 1;
|
||||||
public bool useSmoothDeltaTime;
|
public bool useSmoothDeltaTime;
|
||||||
|
public float maxSmoothUnscaledTime = 0.15f; // Used if useSmoothDeltaTime is TRUE
|
||||||
public bool showUnityEditorReport;
|
public bool showUnityEditorReport;
|
||||||
public LogBehaviour logBehaviour = LogBehaviour.ErrorsOnly;
|
public LogBehaviour logBehaviour = LogBehaviour.ErrorsOnly;
|
||||||
public bool drawGizmos = true;
|
public bool drawGizmos = true;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace DG.Tweening
|
|||||||
public class DOTween
|
public class DOTween
|
||||||
{
|
{
|
||||||
/// <summary>DOTween's version</summary>
|
/// <summary>DOTween's version</summary>
|
||||||
public static readonly string Version = "1.1.540";
|
public static readonly string Version = "1.1.550";
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
// Options ////////////////////////////////////
|
// Options ////////////////////////////////////
|
||||||
@ -50,10 +50,15 @@ namespace DG.Tweening
|
|||||||
/// <para>Default: 1</para></summary>
|
/// <para>Default: 1</para></summary>
|
||||||
public static float timeScale = 1;
|
public static float timeScale = 1;
|
||||||
/// <summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
/// <summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
||||||
/// (unless they're set as timeScaleIndependent, in which case this setting will be ignored).
|
/// (unless they're set as timeScaleIndependent, in which case a value between the last timestep
|
||||||
|
/// and <see cref="maxSmoothUnscaledTime"/> will be used instead).
|
||||||
/// Setting this to TRUE will lead to smoother animations.
|
/// Setting this to TRUE will lead to smoother animations.
|
||||||
/// <para>Default: FALSE</para></summary>
|
/// <para>Default: FALSE</para></summary>
|
||||||
public static bool useSmoothDeltaTime;
|
public static bool useSmoothDeltaTime;
|
||||||
|
/// <summary>If <see cref="useSmoothDeltaTime"/> is TRUE, this indicates the max timeStep that an independent update call can last.
|
||||||
|
/// Setting this to TRUE will lead to smoother animations.
|
||||||
|
/// <para>Default: FALSE</para></summary>
|
||||||
|
public static float maxSmoothUnscaledTime = 0.15f;
|
||||||
/// <summary>DOTween's log behaviour.
|
/// <summary>DOTween's log behaviour.
|
||||||
/// <para>Default: LogBehaviour.ErrorsOnly</para></summary>
|
/// <para>Default: LogBehaviour.ErrorsOnly</para></summary>
|
||||||
public static LogBehaviour logBehaviour {
|
public static LogBehaviour logBehaviour {
|
||||||
@ -174,6 +179,7 @@ namespace DG.Tweening
|
|||||||
if (recycleAllByDefault == null) DOTween.defaultRecyclable = settings.defaultRecyclable;
|
if (recycleAllByDefault == null) DOTween.defaultRecyclable = settings.defaultRecyclable;
|
||||||
DOTween.timeScale = settings.timeScale;
|
DOTween.timeScale = settings.timeScale;
|
||||||
DOTween.useSmoothDeltaTime = settings.useSmoothDeltaTime;
|
DOTween.useSmoothDeltaTime = settings.useSmoothDeltaTime;
|
||||||
|
DOTween.maxSmoothUnscaledTime = settings.maxSmoothUnscaledTime;
|
||||||
DOTween.defaultRecyclable = recycleAllByDefault == null ? settings.defaultRecyclable : (bool)recycleAllByDefault;
|
DOTween.defaultRecyclable = recycleAllByDefault == null ? settings.defaultRecyclable : (bool)recycleAllByDefault;
|
||||||
DOTween.showUnityEditorReport = settings.showUnityEditorReport;
|
DOTween.showUnityEditorReport = settings.showUnityEditorReport;
|
||||||
DOTween.drawGizmos = settings.drawGizmos;
|
DOTween.drawGizmos = settings.drawGizmos;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace DG.DOTweenEditor
|
|||||||
static void ShowWindow() { Open(); }
|
static void ShowWindow() { Open(); }
|
||||||
|
|
||||||
const string _Title = "DOTween Utility Panel";
|
const string _Title = "DOTween Utility Panel";
|
||||||
static readonly Vector2 _WinSize = new Vector2(300,405);
|
static readonly Vector2 _WinSize = new Vector2(300,421);
|
||||||
public const string Id = "DOTweenVersion";
|
public const string Id = "DOTweenVersion";
|
||||||
public const string IdPro = "DOTweenProVersion";
|
public const string IdPro = "DOTweenProVersion";
|
||||||
static readonly float _HalfBtSize = _WinSize.x * 0.5f - 6;
|
static readonly float _HalfBtSize = _WinSize.x * 0.5f - 6;
|
||||||
@ -176,6 +176,7 @@ namespace DG.DOTweenEditor
|
|||||||
_src.showUnityEditorReport = false;
|
_src.showUnityEditorReport = false;
|
||||||
_src.timeScale = 1;
|
_src.timeScale = 1;
|
||||||
_src.useSmoothDeltaTime = false;
|
_src.useSmoothDeltaTime = false;
|
||||||
|
_src.maxSmoothUnscaledTime = 0.15f;
|
||||||
_src.logBehaviour = LogBehaviour.ErrorsOnly;
|
_src.logBehaviour = LogBehaviour.ErrorsOnly;
|
||||||
_src.drawGizmos = true;
|
_src.drawGizmos = true;
|
||||||
_src.defaultRecyclable = false;
|
_src.defaultRecyclable = false;
|
||||||
@ -193,6 +194,7 @@ namespace DG.DOTweenEditor
|
|||||||
_src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", _src.useSafeMode);
|
_src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", _src.useSafeMode);
|
||||||
_src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", _src.timeScale);
|
_src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", _src.timeScale);
|
||||||
_src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", _src.useSmoothDeltaTime);
|
_src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", _src.useSmoothDeltaTime);
|
||||||
|
_src.maxSmoothUnscaledTime = EditorGUILayout.Slider("Max SmoothUnscaledTime", _src.maxSmoothUnscaledTime, 0.01f, 1f);
|
||||||
_src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", _src.showUnityEditorReport);
|
_src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", _src.showUnityEditorReport);
|
||||||
_src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour);
|
_src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour);
|
||||||
_src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", _src.drawGizmos);
|
_src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", _src.drawGizmos);
|
||||||
|
|||||||
@ -250,7 +250,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
<member name="F:DG.Tweening.DOTween.useSmoothDeltaTime">
|
||||||
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
<summary>If TRUE, DOTween will use Time.smoothDeltaTime instead of Time.deltaTime for UpdateType.Normal and UpdateType.Late tweens
|
||||||
(unless they're set as timeScaleIndependent, in which case this setting will be ignored).
|
(unless they're set as timeScaleIndependent, in which case a value between the last timestep
|
||||||
|
and <see cref="F:DG.Tweening.DOTween.maxSmoothUnscaledTime"/> will be used instead).
|
||||||
|
Setting this to TRUE will lead to smoother animations.
|
||||||
|
<para>Default: FALSE</para></summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:DG.Tweening.DOTween.maxSmoothUnscaledTime">
|
||||||
|
<summary>If <see cref="F:DG.Tweening.DOTween.useSmoothDeltaTime"/> is TRUE, this indicates the max timeStep that an independent update call can last.
|
||||||
Setting this to TRUE will lead to smoother animations.
|
Setting this to TRUE will lead to smoother animations.
|
||||||
<para>Default: FALSE</para></summary>
|
<para>Default: FALSE</para></summary>
|
||||||
</member>
|
</member>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user