Sfoglia il codice sorgente

Merge pull request #83781 from martinfelis/fix-animationplayer-ready-autoplay

Ensure AnimationPlayer evaluate animations when autoplay is enabled and node becomes ready
Rémi Verschelde 1 anno fa
parent
commit
7c7d9e2169
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      scene/animation/animation_player.cpp

+ 1 - 0
scene/animation/animation_player.cpp

@@ -151,6 +151,7 @@ void AnimationPlayer::_notification(int p_what) {
 			if (!Engine::get_singleton()->is_editor_hint() && animation_set.has(autoplay)) {
 			if (!Engine::get_singleton()->is_editor_hint() && animation_set.has(autoplay)) {
 				set_active(true);
 				set_active(true);
 				play(autoplay);
 				play(autoplay);
+				seek(0, true);
 			}
 			}
 		} break;
 		} break;
 	}
 	}