summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/class_db_api_json.cpp7
-rw-r--r--modules/mono/csharp_script.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp
index c1d6f4dccf..b04e53bd81 100644
--- a/modules/mono/class_db_api_json.cpp
+++ b/modules/mono/class_db_api_json.cpp
@@ -71,6 +71,13 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) {
while ((k = t->method_map.next(k))) {
+ String name = k->operator String();
+
+ ERR_CONTINUE(name.empty());
+
+ if (name[0] == '_')
+ continue; // Ignore non-virtual methods that start with an underscore
+
snames.push_back(*k);
}
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 0f6b8357b8..210267e681 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -106,7 +106,7 @@ Error CSharpLanguage::execute_file(const String &p_path) {
void CSharpLanguage::init() {
#ifdef DEBUG_METHODS_ENABLED
- if (OS::get_singleton()->get_cmdline_args().find("--class_db_to_json")) {
+ if (OS::get_singleton()->get_cmdline_args().find("--class-db-json")) {
class_db_api_to_json("user://class_db_api.json", ClassDB::API_CORE);
#ifdef TOOLS_ENABLED
class_db_api_to_json("user://class_db_api_editor.json", ClassDB::API_EDITOR);