1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Improve build callbacks

- Build callbacks now return bool to determine if the build was successful. If the build fails, the editor won't run the game.
- Makes sure build callbacks are called after saving the scene ("Save Before Running" option).
This commit is contained in:
Ignacio Etcheverry
2017-08-29 23:59:20 +02:00
parent 909c9e0ba0
commit c18b7046c6
2 changed files with 15 additions and 11 deletions

View File

@@ -85,7 +85,7 @@
typedef void (*EditorNodeInitCallback)();
typedef void (*EditorPluginInitializeCallback)();
typedef void (*EditorBuildCallback)();
typedef bool (*EditorBuildCallback)();
class EditorPluginList;
@@ -575,7 +575,7 @@ private:
static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS];
void _save_default_environment();
void _call_build();
bool _call_build();
static int build_callback_count;
static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS];