Explorar o código

Merge pull request #8982 from noshyaar/pr-anim

Fix autoplay animation starts from last editor state #8976
Andreas Haas %!s(int64=8) %!d(string=hai) anos
pai
achega
5dd52320cb
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      scene/animation/animation_player.cpp

+ 1 - 0
scene/animation/animation_player.cpp

@@ -202,6 +202,7 @@ void AnimationPlayer::_notification(int p_what) {
 			if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) {
 			if (!get_tree()->is_editor_hint() && animation_set.has(autoplay)) {
 				play(autoplay);
 				play(autoplay);
 				set_autoplay(""); //this line is the fix for autoplay issues with animatio
 				set_autoplay(""); //this line is the fix for autoplay issues with animatio
+				_animation_process(0);
 			}
 			}
 		} break;
 		} break;
 		case NOTIFICATION_INTERNAL_PROCESS: {
 		case NOTIFICATION_INTERNAL_PROCESS: {