From eb490898869a0aa905c1e45f2c9c3b4c730dcac1 Mon Sep 17 00:00:00 2001 From: Kaleb Reid <78945904+Kaleb-Reid@users.noreply.github.com> Date: Sun, 26 Oct 2025 22:40:32 -0700 Subject: [PATCH] Remove error when creating Tween directly --- scene/animation/tween.cpp | 3 ++- scene/animation/tween.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index 42abf97f874b..e9329deffd50 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -532,11 +532,12 @@ void Tween::_bind_methods() { } Tween::Tween() { - ERR_FAIL_MSG("Tween can't be created directly. Use create_tween() method."); + dead = true; } Tween::Tween(SceneTree *p_parent_tree) { parent_tree = p_parent_tree; + running = true; valid = true; } diff --git a/scene/animation/tween.h b/scene/animation/tween.h index ab1d7da6ae7e..603260cd6a9c 100644 --- a/scene/animation/tween.h +++ b/scene/animation/tween.h @@ -122,7 +122,7 @@ class Tween : public RefCounted { bool is_bound = false; bool started = false; - bool running = true; + bool running = false; bool in_step = false; bool dead = false; bool valid = false;