From 94debea0a9f15f92aadae8873c52bebd83dca2d6 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 18 Jul 2018 21:15:41 +0200 Subject: [PATCH] Make C# bindings generator ignore disabled classes (cherry picked from commit 92c7fe422be7401e3234988a8369d2d3281f5c03) --- modules/mono/editor/bindings_generator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 4c598d4f374..6fa317ee70b 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -1768,6 +1768,13 @@ void BindingsGenerator::_populate_object_type_interfaces() { continue; } + if (!ClassDB::is_class_enabled(type_cname)) { + if (verbose_output) + WARN_PRINTS("Ignoring type " + type_cname.operator String() + " because it's not enabled"); + class_list.pop_front(); + continue; + } + ClassDB::ClassInfo *class_info = ClassDB::classes.getptr(type_cname); TypeInterface itype = TypeInterface::create_object_type(type_cname, api_type);