-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve type system and obsolete loading types by string path #2484
Comments
I can't find the issue or user but can someone link this to willnationdev |
You can already do what you want, you just need to add class_name MyCustomType
var instance = MyCustomType.new() |
@aaronfranke The main idea for this was so we didn't use string paths for inheritance and scenes. everything could just be linked together with type names and we wouldn't need to worry about where files are. I mean nodes coded in gdscript aren't really inherited as much as just a script attached to a node. Not only that but people can edit your script when you might not even want it to be visible but instead compiled into a package. The final goal is to have true oop system where nodes don't attach scripts and everything is referenced by name. I understand the devs of godot want to keep things easy but sometimes I feel they sacrifice the engines potential to do so and in this case its not easier. |
@Shadowblitz16 My reply to you does not contain any strings. I don't understand what you mean. |
@aaronfranke yes I know. but I think scenes load types by file path don't they? |
Sometimes I really don't want to create custom types, for example when creating a plugin. |
I'm closing my bad proposals |
Describe the project you are working on
Non right now due to me running into bugs or missing features whenever I try to use godot
Describe the problem or limitation you are having in your project
Currently types are loaded with string paths which seems to be a issue in #2307
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Make the engine register custom types by name. this allows things like built in scripts to have class_name or tool keywords.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Most likely other languages load types by name and not by a filepath
Is there a reason why this should be core and not an add-on in the asset library?
It allows extending nodes into true custom types which can be linked in the header of a scene file
The text was updated successfully, but these errors were encountered: