-
Notifications
You must be signed in to change notification settings - Fork 2
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
Scoped packages are placed under a deep folder structure and global classes don't register #29
Comments
NPM's folder structure is the same:
I like this system because it groups up packages in the same scope nicely. Im not quite sure what your issue is. What makes you think the system isnt meant to work this way? |
Hm I see, this might be a problem with Godot. I'm not on the latest commit because we need a stable version in production. I tried with:
I made a small test project to show the problem better. Both plugins are enabled, but only This might be a Godot bug, I'm not sure, the plugin system always had inconsistencies... and I have no idea why you can find the Here's the project I'm working with that doesn't find the The custom My understanding was that they should register only if the plugins are enabled. If you know anything or can replicate the above let me know, I'll open a Godot issue and discuss it there. My initial thought was that the nested structure is quirk and not meant to be used like that in Godot. |
You know, it might be the plugin thing.. I never "enabled" the plugins, as afaik plugin.cfg's and such are completely unnecessary. I think enabling the plugin might be completely deetrimental. Will try turning on the plugin, see if it works then. Yep, plugin on => no class, plugin off => class. Looks like a godot bug. |
That's so weird, for me (on
in Create New Node/Resource. Seems to me the And unfortunately not having the plugin enabled wouldn't be a solution either because some times we do have to run initialization code and do more stuff than just have resources. Regardless, I'll open an issue in the Godot tracker too. |
Also, could you try this addon, and see if the classes show up? |
Hmm, actually my addon doesnt work anymore either. |
I think the nested structure isn't something that the Godot devs thought about and it's just a quirk that it used to work, but maybe they'll work to extend it to function that way at some point. Meanwhile I think the flat addon structure with just one top-level folder is the correct way to go about it until this is solved. |
No, like my non nested classes arent working either. |
Ah well I think that's because you have to make it an actual addon and enable it. I think that's the intended way of how it was working:
But since you don't have a |
No like all of my classes. Not in |
The lookup class thing doesnt seem to work very well as a whole, but if the thing doesnt show up, you can always just drag the |
Yea, I'll have to see how that works with resources, I hope it work the same as you mention, then at least it's a workaround, but it's definitely not ideal. |
Also, if you manually move the folder up (if that fixes it for you) you should be able to use it normally, and it wont break when the file moves, because it seems like the class exists, the dialogue is just super broken. |
Well, unfortunately the workaround doesn't include resources. So I can't drag this And the other thing about moving stuff manually... I mean if I start doing that there won't really be a point to use |
Changing the file structure is kinda a big breaking change, so i dont really want to do it, but ill see if i can fix the godot bug... |
Okay im fairly sure its related to the cache - can you try a |
A bit of background: at GDQuest we're trying to find a solution for dependencies since we have a lot of assets shared between projects, including custom global classes etc.
I think we're kind of stretching the possibilities of the Godot addon-system here, but today I experimented with a few plugins and scoped NPM packages:
They are installed under the
@razcore-rad
folder in this case and although Godot detects the plugins, I don't think the system was meant to work this way:They seem to work fine if there are no global classes (
class_name
) definitions, but in this casekenny_prototype_material
should register a resource material. This works if I move the folder one level above:But not if it's nested under
@razcore-rad
.It would be nice to install the project at
@razcore-rad.addon_name
instead and this should solve the scoped packages problem. What do you think of this case?The text was updated successfully, but these errors were encountered: