Merge pull request #87170 from AThousandShips/run_fix
Fix reloading current scene forgetting path
This commit is contained in:
commit
1d3722a6aa
1 changed files with 2 additions and 1 deletions
|
@ -273,12 +273,13 @@ void EditorRunBar::play_main_scene(bool p_from_native) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorRunBar::play_current_scene(bool p_reload) {
|
void EditorRunBar::play_current_scene(bool p_reload) {
|
||||||
|
String last_current_scene = run_current_filename; // This is necessary to have a copy of the string.
|
||||||
|
|
||||||
EditorNode::get_singleton()->save_default_environment();
|
EditorNode::get_singleton()->save_default_environment();
|
||||||
stop_playing();
|
stop_playing();
|
||||||
|
|
||||||
current_mode = RunMode::RUN_CURRENT;
|
current_mode = RunMode::RUN_CURRENT;
|
||||||
if (p_reload) {
|
if (p_reload) {
|
||||||
String last_current_scene = run_current_filename; // This is necessary to have a copy of the string.
|
|
||||||
_run_scene(last_current_scene);
|
_run_scene(last_current_scene);
|
||||||
} else {
|
} else {
|
||||||
_run_scene();
|
_run_scene();
|
||||||
|
|
Loading…
Add table
Reference in a new issue