Browse Source

Force update AnimationTree player cache when AnimationPlayer changes.

SaracenOne 2 năm trước cách đây
mục cha
commit
eff3828896
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      scene/animation/animation_tree.cpp

+ 2 - 0
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));