-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Access to ScriptServer #1516
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Err.. Quite frankly I didn't know if it was exactly a bug or a feature proposal because we can include That said, sorry if this was indeed meant to be a feature proposal. |
I think it's intentional to give access to the relevant code, but let's see what the feedback is, my bad! |
Whether or not to expose However, it does appear as though So, assuming we don't want to expose it in the normal way, we could add some new functions to |
I do believe |
Godot version
4.3 beta 2
godot-cpp version
master
System information
Windows 10 and Linux Mint
Issue description
If implementing a module, we can include the
script_language.h
file then accessScriptServer
. However this is not exposed to GDExtension. I don't know if there is a reason for that.That said, there are a few things that are very useful. Of particular interest to me is querying if a scripted class inherits from a specific base. I know that we can manually do that by first obtaining the list of "global classes" (
ProjectSettings::get_singleton()->get_global_class_list()
. However this option means that we always have to iterate through the list of classes. Caching the data might result in outdated data. From my understandingScriptServer
is always updated whenever a scripted (global) class is created or removed.I understand if not exposing
ScriptServer
is actually desired.Steps to reproduce
Minimal reproduction project
The text was updated successfully, but these errors were encountered: