diff options
-rw-r--r-- | doc/classes/ARVRServer.xml | 2 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 16 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 44 | ||||
-rw-r--r-- | editor/filesystem_dock.h | 7 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 14 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 | ||||
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 27 | ||||
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 3 | ||||
-rw-r--r-- | modules/mono/editor/godotsharp_export.cpp | 70 | ||||
-rw-r--r-- | modules/mono/editor/mono_bottom_panel.cpp | 3 | ||||
-rw-r--r-- | scene/2d/canvas_item.cpp | 1 | ||||
-rw-r--r-- | scene/3d/area.cpp | 1 |
12 files changed, 124 insertions, 66 deletions
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index a7d3e46684..e089360c46 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -56,7 +56,7 @@ <return type="int"> </return> <description> - Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look through the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. + Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. </description> </method> <method name="get_interfaces" qualifiers="const"> diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 920c587f2b..24673c8755 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -634,14 +634,14 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_ #ifndef GLES_OVER_GL switch (p_format) { - case Image::Format::FORMAT_RF: - case Image::Format::FORMAT_RGF: - case Image::Format::FORMAT_RGBF: - case Image::Format::FORMAT_RGBAF: - case Image::Format::FORMAT_RH: - case Image::Format::FORMAT_RGH: - case Image::Format::FORMAT_RGBH: - case Image::Format::FORMAT_RGBAH: { + case Image::FORMAT_RF: + case Image::FORMAT_RGF: + case Image::FORMAT_RGBF: + case Image::FORMAT_RGBAF: + case Image::FORMAT_RH: + case Image::FORMAT_RGH: + case Image::FORMAT_RGBH: + case Image::FORMAT_RGBAH: { if (!config.texture_float_linear_supported) { // disable linear texture filtering when not supported for float format on some devices (issue #24295) p_flags &= ~VS::TEXTURE_FLAG_FILTER; diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 58af5285b9..1ac66fdd1d 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -51,7 +51,7 @@ Ref<Texture> FileSystemDock::_get_tree_item_icon(EditorFileSystemDirectory *p_di return file_icon; } -bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths) { +bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths, bool p_select_in_favorites) { bool parent_should_expand = false; @@ -66,7 +66,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory subdirectory_item->set_selectable(0, true); String lpath = p_dir->get_path(); subdirectory_item->set_metadata(0, lpath); - if (path == lpath || ((display_mode_setting == DISPLAY_MODE_SETTING_SPLIT) && path.get_base_dir() == lpath)) { + if (!p_select_in_favorites && (path == lpath || ((display_mode_setting == DISPLAY_MODE_SETTING_SPLIT) && path.get_base_dir() == lpath))) { subdirectory_item->select(0); } @@ -81,7 +81,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory // Create items for all subdirectories for (int i = 0; i < p_dir->get_subdir_count(); i++) - parent_should_expand = (_create_tree(subdirectory_item, p_dir->get_subdir(i), uncollapsed_paths) || parent_should_expand); + parent_should_expand = (_create_tree(subdirectory_item, p_dir->get_subdir(i), uncollapsed_paths, p_select_in_favorites) || parent_should_expand); // Create all items for the files in the subdirectory if (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) { @@ -103,7 +103,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory file_item->set_icon(0, _get_tree_item_icon(p_dir, i)); String file_metadata = lpath.plus_file(file_name); file_item->set_metadata(0, file_metadata); - if (path == file_metadata) { + if (!p_select_in_favorites && path == file_metadata) { file_item->select(0); file_item->set_as_cursor(0); } @@ -156,7 +156,7 @@ Vector<String> FileSystemDock::_compute_uncollapsed_paths() { return uncollapsed_paths; } -void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool p_uncollapse_root) { +void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool p_uncollapse_root, bool p_select_in_favorites) { // Recreate the tree tree->clear(); @@ -205,6 +205,10 @@ void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool ti->set_tooltip(0, fave); ti->set_selectable(0, true); ti->set_metadata(0, fave); + if (p_select_in_favorites && fave == path) { + ti->select(0); + ti->set_as_cursor(0); + } if (!fave.ends_with("/")) { Array udata; udata.push_back(tree_update_id); @@ -220,7 +224,7 @@ void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool } // Create the remaining of the tree - _create_tree(root, EditorFileSystem::get_singleton()->get_filesystem(), uncollapsed_paths); + _create_tree(root, EditorFileSystem::get_singleton()->get_filesystem(), uncollapsed_paths, p_select_in_favorites); tree->ensure_cursor_is_visible(); updating_tree = false; } @@ -296,7 +300,7 @@ void FileSystemDock::_notification(int p_what) { file_list_popup->connect("id_pressed", this, "_file_list_rmb_option"); tree_popup->connect("id_pressed", this, "_tree_rmb_option"); - current_path->connect("text_entered", this, "navigate_to_path"); + current_path->connect("text_entered", this, "_navigate_to_path"); display_mode_setting = DisplayModeSetting(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode"))); always_show_folders = bool(EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders")); @@ -442,8 +446,7 @@ void FileSystemDock::_set_current_path_text(const String &p_path) { } } -void FileSystemDock::navigate_to_path(const String &p_path) { - +void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_favorites) { if (p_path == "Favorites") { path = p_path; } else { @@ -466,7 +469,7 @@ void FileSystemDock::navigate_to_path(const String &p_path) { _set_current_path_text(path); _push_to_history(); - _update_tree(_compute_uncollapsed_paths()); + _update_tree(_compute_uncollapsed_paths(), false, p_select_in_favorites); if (display_mode == DISPLAY_MODE_SPLIT) { _update_file_list(false); } @@ -483,6 +486,10 @@ void FileSystemDock::navigate_to_path(const String &p_path) { } } +void FileSystemDock::navigate_to_path(const String &p_path) { + _navigate_to_path(p_path); +} + void FileSystemDock::_file_list_thumbnail_done(const String &p_path, const Ref<Texture> &p_preview, const Ref<Texture> &p_small_preview, const Variant &p_udata) { if ((file_list_vb->is_visible_in_tree() || path == p_path.get_base_dir()) && p_preview.is_valid()) { @@ -790,7 +797,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { } } -void FileSystemDock::_select_file(const String p_path) { +void FileSystemDock::_select_file(const String p_path, bool p_select_in_favorites) { String fpath = p_path; if (fpath.ends_with("/")) { if (fpath != "res://") { @@ -803,17 +810,21 @@ void FileSystemDock::_select_file(const String p_path) { editor->load_resource(fpath); } } - navigate_to_path(fpath); + _navigate_to_path(fpath, p_select_in_favorites); } void FileSystemDock::_tree_activate_file() { TreeItem *selected = tree->get_selected(); if (selected) { - call_deferred("_select_file", selected->get_metadata(0)); + String path = selected->get_metadata(0); + TreeItem *parent = selected->get_parent(); + bool is_favorite = parent != NULL && parent->get_metadata(0) == "Favorites"; - if (path.ends_with("/") || path == "Favorites") { + if ((!is_favorite && path.ends_with("/")) || path == "Favorites") { bool collapsed = selected->is_collapsed(); selected->set_collapsed(!collapsed); + } else { + _select_file(path, is_favorite && !path.ends_with("/")); } } } @@ -2141,7 +2152,7 @@ void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) { void FileSystemDock::select_file(const String &p_file) { - navigate_to_path(p_file); + _navigate_to_path(p_file); } void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) { @@ -2292,7 +2303,7 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(D_METHOD("_file_list_activate_file"), &FileSystemDock::_file_list_activate_file); ClassDB::bind_method(D_METHOD("_tree_activate_file"), &FileSystemDock::_tree_activate_file); ClassDB::bind_method(D_METHOD("_select_file"), &FileSystemDock::_select_file); - ClassDB::bind_method(D_METHOD("navigate_to_path"), &FileSystemDock::navigate_to_path); + ClassDB::bind_method(D_METHOD("_navigate_to_path"), &FileSystemDock::_navigate_to_path); ClassDB::bind_method(D_METHOD("_change_file_display"), &FileSystemDock::_change_file_display); ClassDB::bind_method(D_METHOD("_fw_history"), &FileSystemDock::_fw_history); ClassDB::bind_method(D_METHOD("_bw_history"), &FileSystemDock::_bw_history); @@ -2310,6 +2321,7 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw); ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw); ClassDB::bind_method(D_METHOD("drop_data_fw"), &FileSystemDock::drop_data_fw); + ClassDB::bind_method(D_METHOD("navigate_to_path"), &FileSystemDock::navigate_to_path); ClassDB::bind_method(D_METHOD("_preview_invalidated"), &FileSystemDock::_preview_invalidated); ClassDB::bind_method(D_METHOD("_file_multi_selected"), &FileSystemDock::_file_multi_selected); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index 1f8ae698a3..237413acc4 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -178,9 +178,10 @@ private: bool import_dock_needs_update; Ref<Texture> _get_tree_item_icon(EditorFileSystemDirectory *p_dir, int p_idx); - bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths); + bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths, bool p_select_in_favorites); Vector<String> _compute_uncollapsed_paths(); - void _update_tree(const Vector<String> p_uncollapsed_paths = Vector<String>(), bool p_uncollapse_root = false); + void _update_tree(const Vector<String> p_uncollapsed_paths = Vector<String>(), bool p_uncollapse_root = false, bool p_select_in_favorites = false); + void _navigate_to_path(const String &p_path, bool p_select_in_favorites = false); void _file_list_gui_input(Ref<InputEvent> p_event); void _tree_gui_input(Ref<InputEvent> p_event); @@ -192,7 +193,7 @@ private: void _tree_toggle_collapsed(); - void _select_file(const String p_path); + void _select_file(const String p_path, bool p_select_in_favorites = false); void _tree_activate_file(); void _file_list_activate_file(int p_idx); void _file_multi_selected(int p_index, bool p_selected); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index daa7f92dcf..be1c4a36bd 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -563,6 +563,20 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (node == root) return; + //check that from node to root, all owners are right + + if (node->get_owner() != root) { + accept->set_text(TTR("Node must belong to the edited scene to become root.")); + accept->popup_centered_minsize(); + return; + } + + if (node->get_filename() != String()) { + accept->set_text(TTR("Instantiated scenes can't become root")); + accept->popup_centered_minsize(); + return; + } + editor_data->get_undo_redo().create_action("Make node as Root"); editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); editor_data->get_undo_redo().add_do_method(root->get_parent(), "remove_child", root); diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 1b2ba58d22..13f8385745 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1189,7 +1189,7 @@ bool CSharpLanguage::refcount_decremented_instance_binding(Object *p_object) { return refcount == 0; Ref<MonoGCHandle> &gchandle = ((Map<Object *, CSharpScriptBinding>::Element *)data)->get().gchandle; - if (refcount == 1 && !gchandle->is_weak()) { // The managed side also holds a reference, hence 1 instead of 0 + if (refcount == 1 && gchandle.is_valid() && !gchandle->is_weak()) { // The managed side also holds a reference, hence 1 instead of 0 // If owner owner is no longer referenced by the unmanaged side, // the managed instance takes responsibility of deleting the owner when GCed. diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index cfd684ebbc..0b6a6a327c 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -80,6 +80,7 @@ #define ICALL_GET_METHODBIND ICALL_PREFIX "Object_ClassDB_get_method" #define C_LOCAL_RET "ret" +#define C_LOCAL_VARARG_RET "vararg_ret" #define C_LOCAL_PTRCALL_ARGS "call_args" #define C_MACRO_OBJECT_CONSTRUCT "GODOTSHARP_INSTANCE_OBJECT" @@ -96,7 +97,7 @@ #define C_METHOD_MONOARRAY_TO(m_type) C_NS_MONOMARSHAL "::mono_array_to_" #m_type #define C_METHOD_MONOARRAY_FROM(m_type) C_NS_MONOMARSHAL "::" #m_type "_to_mono_array" -#define BINDINGS_GENERATOR_VERSION UINT32_C(5) +#define BINDINGS_GENERATOR_VERSION UINT32_C(6) const char *BindingsGenerator::TypeInterface::DEFAULT_VARARG_C_IN = "\t%0 %1_in = %1;\n"; @@ -1501,6 +1502,15 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte String ptrcall_return_type; String initialization; + if (p_imethod.is_vararg && return_type->cname != name_cache.type_Variant) { + // VarArg methods always return Variant, but there are some cases in which MethodInfo provides + // a specific return type. We trust this information is valid. We need a temporary local to keep + // the Variant alive until the method returns. Otherwise, if the returned Variant holds a RefPtr, + // it could be deleted too early. This is the case with GDScript.new() which returns OBJECT. + // Alternatively, we could just return Variant, but that would result in a worse API. + p_output.push_back("\tVariant " C_LOCAL_VARARG_RET ";\n"); + } + if (return_type->is_object_type) { ptrcall_return_type = return_type->is_reference ? "Ref<Reference>" : return_type->c_type; initialization = return_type->is_reference ? "" : " = NULL"; @@ -1558,12 +1568,23 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte if (p_imethod.is_vararg) { p_output.push_back("\tVariant::CallError vcall_error;\n\t"); - if (!ret_void) - p_output.push_back(C_LOCAL_RET " = "); + if (!ret_void) { + // See the comment on the C_LOCAL_VARARG_RET declaration + if (return_type->cname != name_cache.type_Variant) { + p_output.push_back(C_LOCAL_VARARG_RET " = "); + } else { + p_output.push_back(C_LOCAL_RET " = "); + } + } p_output.push_back(CS_PARAM_METHODBIND "->call(" CS_PARAM_INSTANCE ", "); p_output.push_back(p_imethod.arguments.size() ? "(const Variant**)" C_LOCAL_PTRCALL_ARGS ".ptr()" : "NULL"); p_output.push_back(", total_length, vcall_error);\n"); + + // See the comment on the C_LOCAL_VARARG_RET declaration + if (return_type->cname != name_cache.type_Variant) { + p_output.push_back("\t" C_LOCAL_RET " = " C_LOCAL_VARARG_RET ";\n"); + } } else { p_output.push_back("\t" CS_PARAM_METHODBIND "->ptrcall(" CS_PARAM_INSTANCE ", "); p_output.push_back(p_imethod.arguments.size() ? C_LOCAL_PTRCALL_ARGS ", " : "NULL, "); diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index 4b32a0bfeb..5d9f4d8d54 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -381,6 +381,9 @@ bool GodotSharpBuilds::build_project_blocking(const String &p_config) { bool GodotSharpBuilds::editor_build_callback() { + if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path())) + return true; // No solution to build + String scripts_metadata_path_editor = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor"); String scripts_metadata_path_player = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor_player"); diff --git a/modules/mono/editor/godotsharp_export.cpp b/modules/mono/editor/godotsharp_export.cpp index 85a1785e87..47341e3555 100644 --- a/modules/mono/editor/godotsharp_export.cpp +++ b/modules/mono/editor/godotsharp_export.cpp @@ -85,53 +85,55 @@ void GodotSharpExport::_export_begin(const Set<String> &p_features, bool p_debug ERR_FAIL_NULL(TOOLS_DOMAIN); ERR_FAIL_NULL(GDMono::get_singleton()->get_editor_tools_assembly()); - String build_config = p_debug ? "Debug" : "Release"; + if (FileAccess::exists(GodotSharpDirs::get_project_sln_path())) { + String build_config = p_debug ? "Debug" : "Release"; - String scripts_metadata_path = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata." + String(p_debug ? "debug" : "release")); - Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path); - ERR_FAIL_COND(metadata_err != OK); + String scripts_metadata_path = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata." + String(p_debug ? "debug" : "release")); + Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path); + ERR_FAIL_COND(metadata_err != OK); - ERR_FAIL_COND(!_add_file(scripts_metadata_path, scripts_metadata_path)); + ERR_FAIL_COND(!_add_file(scripts_metadata_path, scripts_metadata_path)); - ERR_FAIL_COND(!GodotSharpBuilds::build_project_blocking(build_config)); + ERR_FAIL_COND(!GodotSharpBuilds::build_project_blocking(build_config)); - // Add dependency assemblies + // Add dependency assemblies - Map<String, String> dependencies; + Map<String, String> dependencies; - String project_dll_name = ProjectSettings::get_singleton()->get("application/config/name"); - if (project_dll_name.empty()) { - project_dll_name = "UnnamedProject"; - } + String project_dll_name = ProjectSettings::get_singleton()->get("application/config/name"); + if (project_dll_name.empty()) { + project_dll_name = "UnnamedProject"; + } - String project_dll_src_dir = GodotSharpDirs::get_res_temp_assemblies_base_dir().plus_file(build_config); - String project_dll_src_path = project_dll_src_dir.plus_file(project_dll_name + ".dll"); - dependencies.insert(project_dll_name, project_dll_src_path); + String project_dll_src_dir = GodotSharpDirs::get_res_temp_assemblies_base_dir().plus_file(build_config); + String project_dll_src_path = project_dll_src_dir.plus_file(project_dll_name + ".dll"); + dependencies.insert(project_dll_name, project_dll_src_path); - { - MonoDomain *export_domain = GDMonoUtils::create_domain("GodotEngine.ProjectExportDomain"); - ERR_FAIL_NULL(export_domain); - _GDMONO_SCOPE_EXIT_DOMAIN_UNLOAD_(export_domain); + { + MonoDomain *export_domain = GDMonoUtils::create_domain("GodotEngine.ProjectExportDomain"); + ERR_FAIL_NULL(export_domain); + _GDMONO_SCOPE_EXIT_DOMAIN_UNLOAD_(export_domain); - _GDMONO_SCOPE_DOMAIN_(export_domain); + _GDMONO_SCOPE_DOMAIN_(export_domain); - GDMonoAssembly *scripts_assembly = NULL; - bool load_success = GDMono::get_singleton()->load_assembly_from(project_dll_name, - project_dll_src_path, &scripts_assembly, /* refonly: */ true); + GDMonoAssembly *scripts_assembly = NULL; + bool load_success = GDMono::get_singleton()->load_assembly_from(project_dll_name, + project_dll_src_path, &scripts_assembly, /* refonly: */ true); - ERR_EXPLAIN("Cannot load refonly assembly: " + project_dll_name); - ERR_FAIL_COND(!load_success); + ERR_EXPLAIN("Cannot load refonly assembly: " + project_dll_name); + ERR_FAIL_COND(!load_success); - Vector<String> search_dirs; - GDMonoAssembly::fill_search_dirs(search_dirs); - Error depend_error = _get_assembly_dependencies(scripts_assembly, search_dirs, dependencies); - ERR_FAIL_COND(depend_error != OK); - } + Vector<String> search_dirs; + GDMonoAssembly::fill_search_dirs(search_dirs); + Error depend_error = _get_assembly_dependencies(scripts_assembly, search_dirs, dependencies); + ERR_FAIL_COND(depend_error != OK); + } - for (Map<String, String>::Element *E = dependencies.front(); E; E = E->next()) { - String depend_src_path = E->value(); - String depend_dst_path = GodotSharpDirs::get_res_assemblies_dir().plus_file(depend_src_path.get_file()); - ERR_FAIL_COND(!_add_file(depend_src_path, depend_dst_path)); + for (Map<String, String>::Element *E = dependencies.front(); E; E = E->next()) { + String depend_src_path = E->value(); + String depend_dst_path = GodotSharpDirs::get_res_assemblies_dir().plus_file(depend_src_path.get_file()); + ERR_FAIL_COND(!_add_file(depend_src_path, depend_dst_path)); + } } // Mono specific export template extras (data dir) diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp index 177a95acc7..feebdb380b 100644 --- a/modules/mono/editor/mono_bottom_panel.cpp +++ b/modules/mono/editor/mono_bottom_panel.cpp @@ -150,6 +150,9 @@ void MonoBottomPanel::_errors_toggled(bool p_pressed) { void MonoBottomPanel::_build_project_pressed() { + if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path())) + return; // No solution to build + String scripts_metadata_path = GodotSharpDirs::get_res_metadata_dir().plus_file("scripts_metadata.editor"); Error metadata_err = CSharpProject::generate_scripts_metadata(GodotSharpDirs::get_project_csproj_path(), scripts_metadata_path); ERR_FAIL_COND(metadata_err != OK); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 3aaed4fb27..6ed008cf9c 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -64,6 +64,7 @@ void CanvasItemMaterial::init_shaders() { void CanvasItemMaterial::finish_shaders() { memdelete(dirty_materials); + memdelete(shader_names); dirty_materials = NULL; #ifndef NO_THREADS diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 27bace9529..99f43b1242 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -753,6 +753,7 @@ Area::Area() : angular_damp = 1; priority = 0; monitoring = false; + monitorable = false; collision_mask = 1; collision_layer = 1; set_ray_pickable(false); |