Skip to content

Scoped packages are placed under a deep folder structure and global classes don't register #29

@razcore-rad

Description

@razcore-rad

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:

❯ tree -L 2 addons/
addons/
└── @razcore-rad
    ├── colorpicker_presets
    └── kenny_prototype_material

They seem to work fine if there are no global classes (class_name) definitions, but in this case kenny_prototype_material should register a resource material. This works if I move the folder one level above:

❯ tree -L 2 addons/
addons/
├── kenny_prototype_material
│   ├── ...
└── @razcore-rad
    └── colorpicker_presets

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions