Skip to content

Commit 8bdab23

Browse files
committed
Fix tween not updating with duration of 0
1 parent f4185d2 commit 8bdab23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Tween.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ internal enum Flag
9595
/// <summary>
9696
/// The tween's percentage of completion.
9797
/// </summary>
98-
public float PercentComplete => UnityEngine.Mathf.Clamp01(elapsed / duration);
98+
public float PercentComplete => duration > 0f ? UnityEngine.Mathf.Clamp01(elapsed / duration) : 1f;
9999

100100
/// <summary>
101101
/// The amount of seconds the tween waits before playing after being

0 commit comments

Comments
 (0)