Browse Source

bindgen: Properly escape NodePath in default args

Rémi Verschelde 4 năm trước cách đây
mục cha
commit
83ef64079b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      binding_generator.py

+ 1 - 1
binding_generator.py

@@ -308,7 +308,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
                     return "Rect2" + default_value
                 if _type == "Variant":
                     return "Variant()" if default_value == "Null" else default_value
-                if _type == "String":
+                if _type == "String" or _type == "NodePath":
                     return "\"" + default_value + "\""
                 if _type == "RID":
                     return "RID()"