Skip to content

Commit 394d64a

Browse files
Resolved an issue where delegates will be invoked when explicitly asked not to
1 parent c9f3221 commit 394d64a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/TweenInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ internal sealed override void Update() {
149149

150150
/// <summary>The cancel method will cancel the Tween. When the Tween is cancelled, the OnCancel and OnFinally delegates will be invoked.</summary>
151151
public sealed override void Cancel() {
152-
if (!dontInvokeWhenDestroyed && component == null) {
152+
if (!dontInvokeWhenDestroyed || component != null) {
153153
onCancel?.Invoke(this);
154154
onFinally?.Invoke(this);
155155
}

0 commit comments

Comments
 (0)