|
@@ -1036,7 +1036,6 @@ void EditorNode::_dialog_action(String p_file) {
|
|
|
|
|
|
_save_default_environment();
|
|
_save_default_environment();
|
|
_save_scene_with_preview(p_file);
|
|
_save_scene_with_preview(p_file);
|
|
- _call_build();
|
|
|
|
_run(true);
|
|
_run(true);
|
|
}
|
|
}
|
|
} break;
|
|
} break;
|
|
@@ -1586,6 +1585,9 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
|
|
editor_data.save_editor_external_data();
|
|
editor_data.save_editor_external_data();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!_call_build())
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (bool(EDITOR_DEF("run/output/always_clear_output_on_play", true))) {
|
|
if (bool(EDITOR_DEF("run/output/always_clear_output_on_play", true))) {
|
|
log->clear();
|
|
log->clear();
|
|
}
|
|
}
|
|
@@ -2045,7 +2047,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
} break;
|
|
} break;
|
|
case RUN_PLAY: {
|
|
case RUN_PLAY: {
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
- _call_build();
|
|
|
|
_run(false);
|
|
_run(false);
|
|
|
|
|
|
} break;
|
|
} break;
|
|
@@ -2090,7 +2091,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
|
|
|
|
_save_default_environment();
|
|
_save_default_environment();
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
- _call_build();
|
|
|
|
_run(true);
|
|
_run(true);
|
|
|
|
|
|
} break;
|
|
} break;
|
|
@@ -2102,7 +2102,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
}
|
|
}
|
|
if (run_native->is_deploy_debug_remote_enabled()) {
|
|
if (run_native->is_deploy_debug_remote_enabled()) {
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
_menu_option_confirm(RUN_STOP, true);
|
|
- _call_build();
|
|
|
|
|
|
+
|
|
|
|
+ if (!_call_build())
|
|
|
|
+ break; // build failed
|
|
|
|
+
|
|
emit_signal("play_pressed");
|
|
emit_signal("play_pressed");
|
|
editor_run.run_native_notify();
|
|
editor_run.run_native_notify();
|
|
}
|
|
}
|
|
@@ -3056,7 +3059,6 @@ void EditorNode::_quick_opened() {
|
|
|
|
|
|
void EditorNode::_quick_run() {
|
|
void EditorNode::_quick_run() {
|
|
|
|
|
|
- _call_build();
|
|
|
|
_run(false, quick_run->get_selected());
|
|
_run(false, quick_run->get_selected());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4232,13 +4234,16 @@ void EditorNode::add_build_callback(EditorBuildCallback p_callback) {
|
|
build_callbacks[build_callback_count++] = p_callback;
|
|
build_callbacks[build_callback_count++] = p_callback;
|
|
}
|
|
}
|
|
|
|
|
|
-EditorPluginInitializeCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
|
|
|
|
|
|
+EditorBuildCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
|
|
|
|
|
|
-void EditorNode::_call_build() {
|
|
|
|
|
|
+bool EditorNode::_call_build() {
|
|
|
|
|
|
for (int i = 0; i < build_callback_count; i++) {
|
|
for (int i = 0; i < build_callback_count; i++) {
|
|
- build_callbacks[i]();
|
|
|
|
|
|
+ if (!build_callbacks[i]())
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
void EditorNode::_inherit_imported(const String &p_action) {
|
|
void EditorNode::_inherit_imported(const String &p_action) {
|