summaryrefslogtreecommitdiff
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r--modules/mono/csharp_script.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 01ac4d83bb..ba8c7df9cc 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -51,6 +51,7 @@
#define CACHED_STRING_NAME(m_var) (CSharpLanguage::get_singleton()->get_string_names().m_var)
+#ifdef TOOLS_ENABLED
static bool _create_project_solution_if_needed() {
String sln_path = GodotSharpDirs::get_project_sln_path();
@@ -65,6 +66,7 @@ static bool _create_project_solution_if_needed() {
return true;
}
+#endif
CSharpLanguage *CSharpLanguage::singleton = NULL;
@@ -1269,7 +1271,8 @@ bool CSharpScript::_update_exports() {
GDMonoField *field = fields[i];
if (field->is_static()) {
- ERR_PRINTS("Cannot export field because it is static: " + top->get_full_name() + "." + field->get_name());
+ if (field->has_attribute(CACHED_CLASS(ExportAttribute)))
+ ERR_PRINTS("Cannot export field because it is static: " + top->get_full_name() + "." + field->get_name());
continue;
}