-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support every class-registration option that Godot offers #563
Comments
Thanks for listing all these functions, very useful! 👍 Two things to keep in mind:
Maybe handy: direct link to Godot's gdextension_interface.h on |
Recent updates:
I would exclude the following from the list -- let's only implement them if we have strong demand with concrete use cases.
Furthermore, |
Let's make a concrete plan on what to support for which use cases, and then start working on them. Otherwise this becomes another eternal issue. If we don't have a use case right now, we can always open new issues once one comes up, but we shouldn't track all parameters pre-emptively just in case. The only remaining one where I see immediate usefulness is Also ticked off a few that have been implemented in the meantime. |
i think |
To register a class with godot we use the
GDExtensionClassCreationInfo
struct, which has two versions depending on the godot version:Each corresponding to something configurable about class registration.
Current state of user-available registration options:
is_virtual
1is_abstract
we might need to set this to true for classes that cant be instantiated 1is_exposed
set_func
get_func
get_property_list_func
(Addget_property_list
#707)free_property_list_func
property_can_revert_func
property_get_revert_func
validate_property_func
notification_func
throughon_notification
in interfaceto_string_func
throughto_string
in interfacereference_func
is used to update the refcount, but the user cannot add custom logic to thisunreference_func
is used to update the refcount, but the user cannot add custom logic to thiscreate_instance_func
based oninit
function in interfacerecreate_instance_func
based oninit
function in interfaceget_virtual_func
generated from virtual method implementationsget_virtual_call_data_func
mutually exclusive withget_virtual_func
, will not implement without a use-casecall_virtual_with_data_func
must be implemented along with aboveget_rid_func
class_userdata
The planned builder-api would likely want the ability to set/override these options as desired.
Footnotes
See this pr for information about what virtual vs abstract classes mean in godot ↩ ↩2
The text was updated successfully, but these errors were encountered: