mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 01:06:02 +08:00
Added new setting for maxSmoothUnscaledTime
This commit is contained in:
parent
bcebcb0c8f
commit
0163e246a4
@ -250,7 +250,13 @@
|
||||
</member>
|
||||
<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
|
||||
(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.
|
||||
<para>Default: FALSE</para></summary>
|
||||
</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 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
|
||||
(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.
|
||||
<para>Default: FALSE</para></summary>
|
||||
</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 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
|
||||
(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.
|
||||
<para>Default: FALSE</para></summary>
|
||||
</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()
|
||||
{
|
||||
_unscaledDeltaTime = Time.realtimeSinceStartup - _unscaledTime;
|
||||
if (DOTween.useSmoothDeltaTime && _unscaledDeltaTime > DOTween.maxSmoothUnscaledTime) _unscaledDeltaTime = DOTween.maxSmoothUnscaledTime;
|
||||
if (TweenManager.hasActiveDefaultTweens) {
|
||||
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 float timeScale = 1;
|
||||
public bool useSmoothDeltaTime;
|
||||
public float maxSmoothUnscaledTime = 0.15f; // Used if useSmoothDeltaTime is TRUE
|
||||
public bool showUnityEditorReport;
|
||||
public LogBehaviour logBehaviour = LogBehaviour.ErrorsOnly;
|
||||
public bool drawGizmos = true;
|
||||
|
||||
@ -32,7 +32,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.1.540";
|
||||
public static readonly string Version = "1.1.550";
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
@ -50,10 +50,15 @@ namespace DG.Tweening
|
||||
/// <para>Default: 1</para></summary>
|
||||
public static float timeScale = 1;
|
||||
/// <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.
|
||||
/// <para>Default: FALSE</para></summary>
|
||||
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.
|
||||
/// <para>Default: LogBehaviour.ErrorsOnly</para></summary>
|
||||
public static LogBehaviour logBehaviour {
|
||||
@ -174,6 +179,7 @@ namespace DG.Tweening
|
||||
if (recycleAllByDefault == null) DOTween.defaultRecyclable = settings.defaultRecyclable;
|
||||
DOTween.timeScale = settings.timeScale;
|
||||
DOTween.useSmoothDeltaTime = settings.useSmoothDeltaTime;
|
||||
DOTween.maxSmoothUnscaledTime = settings.maxSmoothUnscaledTime;
|
||||
DOTween.defaultRecyclable = recycleAllByDefault == null ? settings.defaultRecyclable : (bool)recycleAllByDefault;
|
||||
DOTween.showUnityEditorReport = settings.showUnityEditorReport;
|
||||
DOTween.drawGizmos = settings.drawGizmos;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace DG.DOTweenEditor
|
||||
static void ShowWindow() { Open(); }
|
||||
|
||||
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 IdPro = "DOTweenProVersion";
|
||||
static readonly float _HalfBtSize = _WinSize.x * 0.5f - 6;
|
||||
@ -176,6 +176,7 @@ namespace DG.DOTweenEditor
|
||||
_src.showUnityEditorReport = false;
|
||||
_src.timeScale = 1;
|
||||
_src.useSmoothDeltaTime = false;
|
||||
_src.maxSmoothUnscaledTime = 0.15f;
|
||||
_src.logBehaviour = LogBehaviour.ErrorsOnly;
|
||||
_src.drawGizmos = true;
|
||||
_src.defaultRecyclable = false;
|
||||
@ -193,6 +194,7 @@ namespace DG.DOTweenEditor
|
||||
_src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", _src.useSafeMode);
|
||||
_src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", _src.timeScale);
|
||||
_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.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour);
|
||||
_src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", _src.drawGizmos);
|
||||
|
||||
@ -250,7 +250,13 @@
|
||||
</member>
|
||||
<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
|
||||
(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.
|
||||
<para>Default: FALSE</para></summary>
|
||||
</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