|
@@ -713,6 +713,10 @@ void EditorInterface::save_all_scenes() {
|
|
|
EditorNode::get_singleton()->save_all_scenes();
|
|
|
}
|
|
|
|
|
|
+Error EditorInterface::close_scene() {
|
|
|
+ return EditorNode::get_singleton()->close_scene() ? OK : ERR_DOES_NOT_EXIST;
|
|
|
+}
|
|
|
+
|
|
|
// Scene playback.
|
|
|
|
|
|
void EditorInterface::play_main_scene() {
|
|
@@ -845,6 +849,7 @@ void EditorInterface::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene);
|
|
|
ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
|
|
|
ClassDB::bind_method(D_METHOD("save_all_scenes"), &EditorInterface::save_all_scenes);
|
|
|
+ ClassDB::bind_method(D_METHOD("close_scene"), &EditorInterface::close_scene);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("mark_scene_as_unsaved"), &EditorInterface::mark_scene_as_unsaved);
|
|
|
|