-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Implement inherits_script() for NativeScript and PluginScript #51180
Implement inherits_script() for NativeScript and PluginScript #51180
Conversation
CC @touilleMan to help with PluginScript. Note that neither NativeScript nor PluginScript are likely usable in the |
regarding (my 2 cents: this method should be renamed or at least have some comments near it definition to explain in which order it is supposed to work... I the current state I personally can't say if it implementation is expected or not 😄 ) Regarding PluginScript implementation, base script information is provided during Script creation: godot/modules/gdnative/pluginscript/pluginscript_script.cpp Lines 286 to 300 in b9d544b
So I think we should be able to implement However I wonder why this need to be implemented on in each Script, it feels much simpler to have one default implementation in |
cc72f9d
to
2dcd064
Compare
Thank you very much, @touilleMan. I've fixed the inverted logic and implemented the function for PluginScript, both being based on the GDScript implementation. Now, regarding the approach of doing it by name without having to have an implementation per type of script, I believe that makes sense and would also allow to do checks in hierarchies mixing different scripting languages, as long as that can happen. However, maybe that would be better separately discussed. If the implementations I've added here are good, that would already be unblocking my current work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks! |
Just that.
Now onlyPluginScript
is missing an implementation.