-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Complete, consolidate, and optimize user-defined types (Script classes/Custom types) #22
Comments
Related to godotengine/godot#26875. |
This should get attention. Coherence with all scripting languages should be a must. |
No need to support two different systems (godotengine/godot-proposals#22). Fixes an issue with the resource appearing in every resource popup.
I support this! |
FYI, for those wondering, I would work on getting PRs submitted for this by updating my WIP branches and whatnot, but I can't even get the master branch to run the editor without it crashing, so I have to wait until things are more stable. |
Would love to see work done in this area, now addons feel quite far behind other package managers (npm, cargo etc) in terms of features. There are also bugs and issues which prevent me for really using the system as intended (#2420) |
@tavurth Chances are, PR #44879 will be merged for an upcoming 3.2 release (perhaps 3.2.5), and that will lay the groundwork for adding script class support and data serialization for all scripting languages. The next step would be to provide helper methods and scene binding for scripts that facilitate merging the inheritance hierarchies of the two divergent APIs. See #1935 for details on that. |
Describe the project you are working on:
I work on plugins and editor changes. Both involve creating editing tools for types within Godot's API and they currently support two different, highly divergent systems that don't both need to exist.
Describe how this feature / enhancement will help your project:
The engine's codebase splits user-defined types between Custom Types and Script Classes. The newer, superior Script Class system has not yet been fully implemented for all languages and therefore results in things needing to account for both user-defined "named" types. This further complicates any and all type-checking logic in the editor.
For the purposes of cleaning up the codebase and simplifying the implementation of future engine features, I propose that we...
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
An interim PR that simply refactored Custom Types to be accessible by name, and which also optimized the CreateDialog can be found here. @HeartoLazor also shared this gif of the PR correctly optimizing the CreateDialog as needed, although with some other bugs related to autoloads. We would need to fix those bugs and split the work between 4 separate PRs that each introduces one of the features in isolation for testing purposes.
Describe implementation detail for your proposal (in code), if possible:
VisualScriptLanguage::get_global_class_name
to extract the values of these properties and return them to the EditorFileSystem for generating script class names.CSharpScript::get_base_script()
. This is frequently how the editor language-agnostically tracks inheritance hierarchies for scripted types, so I believe this would need to correctly return a Script object that refers to the parent class of the CSharpScript.CSharpScriptLanguage::get_global_class_name
to extract the values for this attribute and return them to the EditorFileSystem for generating script class names.if cpp_type do ClassDB else do EditorData::script_class stuff
logic should be refactored to dedicated EditorData methods, such as in this existing "export Resources" PR.Godot.GD.MyClass
.ScriptClasses::get("MyClass")
. I'm not sure how all that would be done, but it's worth looking into.res://addons/**
subdirectory and whose relevant plugin has an inactive status in the ProjectSettings.If this enhancement will not be used often, can it be worked around with a few lines of script?:
Uhh....no.
Is there a reason why this should be core and not an add-on in the asset library?:
It involves extensive changes to multiple scripting languages and editor classes that already exist in the main repository. An addon cannot provide the necessary alterations.
The text was updated successfully, but these errors were encountered: