Skip to content

Commit e9b9b7d

Browse files
committed
Avoid generating "internal" methods
1 parent fed0fbe commit e9b9b7d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

addons/csharp_gdextension_bindgen/csharp_gdextension_bindgen.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ static func generate_csharp_script(
148148
for method in ClassDB.class_get_method_list(cls_name, true):
149149
if method["flags"] & (METHOD_FLAG_VIRTUAL | METHOD_FLAG_VIRTUAL_REQUIRED):
150150
continue
151+
if method["name"].begins_with("_"):
152+
continue
151153
method_names.append(method["name"])
152154
methods.append(_generate_method(cls_name, method))
153155

@@ -157,6 +159,8 @@ static func generate_csharp_script(
157159
for method in ClassDB.class_get_method_list(inherited_class, true):
158160
if method["flags"] & (METHOD_FLAG_VIRTUAL | METHOD_FLAG_VIRTUAL_REQUIRED):
159161
continue
162+
if method["name"].begins_with("_"):
163+
continue
160164
inherited_methods.append(_generate_method(inherited_class, method))
161165

162166
# SIGNALS

0 commit comments

Comments
 (0)