summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaracenOne <SaracenOne@gmail.com>2023-01-24 04:18:12 +0000
committerSaracenOne <SaracenOne@gmail.com>2023-01-31 11:32:05 +0000
commiteff3828896bdb9537341ff158225b28bd84e4dc1 (patch)
tree6a2bab44db11fa5cd8398d5099869545c353f90d
parent5bcf016f1134c9c28d21bf33d8fdf394f3b354db (diff)
Force update AnimationTree player cache when AnimationPlayer changes.
-rw-r--r--scene/animation/animation_tree.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 1c1f94c986..fa72bbc593 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -1861,6 +1861,8 @@ void AnimationTree::_setup_animation_player() {
return;
}
+ cache_valid = false;
+
AnimationPlayer *new_player = nullptr;
if (!animation_player.is_empty()) {
new_player = Object::cast_to<AnimationPlayer>(get_node_or_null(animation_player));