Merge pull request #71949 from SaracenOne/update_animation_tree_cache

Force update AnimationTree player cache when AnimationPlayer changes.
This commit is contained in:
Rémi Verschelde 2023-01-31 13:19:36 +01:00
commit 62e939fcf7
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1861,6 +1861,8 @@ void AnimationTree::_setup_animation_player() {
return; return;
} }
cache_valid = false;
AnimationPlayer *new_player = nullptr; AnimationPlayer *new_player = nullptr;
if (!animation_player.is_empty()) { if (!animation_player.is_empty()) {
new_player = Object::cast_to<AnimationPlayer>(get_node_or_null(animation_player)); new_player = Object::cast_to<AnimationPlayer>(get_node_or_null(animation_player));