aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
authorWill Nations2018-01-08 09:55:22 -0600
committerWill Nations2018-01-08 13:02:47 -0600
commit732a877b21cf41ca649ab09ed57eff426066ffca (patch)
treeed049b7bfdcadce6b321905b5214335d05dfb56a /editor/editor_plugin.cpp
parent1fea0adc5c3f250b585c89f56e6fd0e07ba61f83 (diff)
downloadgodot-732a877b21cf41ca649ab09ed57eff426066ffca.tar.gz
godot-732a877b21cf41ca649ab09ed57eff426066ffca.tar.zst
godot-732a877b21cf41ca649ab09ed57eff426066ffca.zip
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 9dd8a7232..8f1c06f54 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -614,6 +614,15 @@ void EditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
}
}
+bool EditorPlugin::build() {
+
+ if (get_script_instance() && get_script_instance()->has_method("build")) {
+ return get_script_instance()->call("build");
+ }
+
+ return true;
+}
+
void EditorPlugin::queue_save_layout() const {
EditorNode::get_singleton()->save_layout();
@@ -686,6 +695,7 @@ void EditorPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::POOL_STRING_ARRAY, "get_breakpoints"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "build"));
ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));