Skip to content

Commit

Permalink
Merge pull request #71949 from SaracenOne/update_animation_tree_cache
Browse files Browse the repository at this point in the history
Force update AnimationTree player cache when AnimationPlayer changes.
  • Loading branch information
akien-mga committed Jan 31, 2023
2 parents 78e7087 + eff3828 commit 62e939f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/animation/animation_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 62e939f

Please sign in to comment.