Commit Graph

9 Commits (8dbaf5a7ff0b75222948d9e53633f584499f12bf)

Author SHA1 Message Date
Teodor Potancok 5c32dc3948 Cast `Variant::Type` to `GDNativeVariantType` 2022-05-17 07:01:43 +02:00
bruvzg 031a83b0ea
[Method Bind] Add support for default argument values and static method binding. Sync headers. 2022-05-06 10:17:51 +03:00
bruvzg 057a771fda
Add support for variadic method binds with the typed return. Sync headers. 2022-03-30 15:11:28 +03:00
Rémi Verschelde 1632322ce0 Update copyright year 2022-03-15 10:17:53 +01:00
Melissa Geels d97dc518d3 Fixed crash on release builds due to missing argument type information 2022-03-02 14:44:23 +01:00
Bastiaan Olij 94efe3d410 Fixing compiler warnings around implicit type casting loosing precision 2021-11-22 21:48:20 +11:00
George Marques 38ee8bfcf7 Change constructor/destructor management of extension classes
This makes sure custom constructors are always called on extension
classes. However, note that constructors should not take any parameters,
since Godot doesn't support that. Parameters are ignore in memnew macro.

Use memnew(MyClass()) instead of memnew(MyClass) since it now needs a
value instead of a class name. This macro calls MyClass::_new() (define
in GDCLASS macro) which ultimately calls Godot to create the object,
ensuring that both the Godot and the extension instances are created.

Non Godot classes (that don't derive godot::Object) are constructed as
usual an can have parameters.

memdelete is also changed for the same reason, as it needs to destroy
the Godot object as well, and that automatically frees the bound
extension instance.
2021-09-27 23:08:11 +10:00
George Marques a0634cca3f Auto-bind virtual method overrides 2021-09-27 23:08:08 +10:00
George Marques e4ed48976a Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00