浏览代码

Reset position to 0 after animation selected on AnimationPlayerEditor

Silc Lizard (Tokage) Renew 1 年之前
父节点
当前提交
b326a35747
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      editor/plugins/animation_player_editor_plugin.cpp

+ 1 - 0
editor/plugins/animation_player_editor_plugin.cpp

@@ -345,6 +345,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
 		}
 		frame->set_max((double)anim->get_length());
 		autoplay->set_pressed(current == player->get_autoplay());
+		player->stop();
 	} else {
 		track_editor->set_animation(Ref<Animation>(), true);
 		track_editor->set_root(nullptr);