From 96a3b91eee653898c98e4922db5255610e370abc Mon Sep 17 00:00:00 2001 From: NutmegStudio <62319714+NutmegStudio@users.noreply.github.com> Date: Sat, 30 May 2020 12:21:24 +0700 Subject: [PATCH] Fixes building mono release templates (cherry picked from commit a77f633161e5f105a89afbba81056b87319c1aad) --- modules/mono/csharp_script.cpp | 2 ++ modules/mono/mono_gd/gd_mono.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index cdaeef2400f..98a43bdf538 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2629,7 +2629,9 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect return true; } +#ifdef TOOLS_ENABLED MonoObject *attr = p_member->get_attribute(CACHED_CLASS(ExportAttribute)); +#endif PropertyHint hint = PROPERTY_HINT_NONE; String hint_string; diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 39da0439f70..4fbd74ba672 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -425,10 +425,10 @@ void GDMono::initialize_load_assemblies() { #if defined(TOOLS_ENABLED) bool tool_assemblies_loaded = _load_tools_assemblies(); CRASH_COND_MSG(!tool_assemblies_loaded, "Mono: Failed to load '" TOOLS_ASM_NAME "' assemblies."); -#endif if (Main::is_project_manager()) return; +#endif // Load the project's main assembly. This doesn't necessarily need to succeed. // The game may not be using .NET at all, or if the project does use .NET and