-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Increase Script Class Name access. #62273
Increase Script Class Name access. #62273
Conversation
Added `ScriptServer::get_global_class_name()` Added `Object::get_script_class_name()` Added `Script::get_global_class_name()` Changed `*::is_class()` to check Script Class Names as well.
a9e0511
to
28f6bb5
Compare
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.
I don't have too much authority, but I think that, for the most part, you've got a nice set of changes here. There's just a little tweaking necessary to really make it compatible with the rest of the codebase without forcing huge portions of the engine to be refactored and retested.
Note that we now have a method in ProjectSettings to get a list of global classes, so something about this PR should likely be changed. |
After reviewing what has changed, and also the state of extensions, I believe this PR is no longer needed.
|
As of January 2024, Script::get_global_name is still not exposed. |
Yes it is? It's been for almost a month. |
It was exposed by #80487, which will be in 4.3. I assume @API-Beast tested on 4.2.x. |
Added
StringName ScriptServer::get_global_class_name(StringName script_path)
Added
StringName Object::get_script_class_name()
Added
StringName Script::get_global_class_name()
Changed
*::is_class()
to check Script Class Names as well. (Supports Script Inheritance)Fixes: #21789
Might Fix: godotengine/godot-proposals#4708
Test Project: ClassNameTest.zip