-
-
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
Add support for installing/managing addons via Git URL #8780
Comments
Note that the AssetLib tab in the editor already has an Import button which accepts a ZIP archive: If we add a similar button, I would make it act the same way. Reusing code here may be challenging though, as the AssetLib tab isn't a popup like the project settings. Downloading from Git URLs requires The ZIP download URL can be inferred from Git repository URLs on GitHub, GitLab, BitBucket and more. We can have a default scheme that appends
I'd rather not see two different, conflicting ways to install add-ons that require add-ons to be packaged differently. The asset library is here for a reason – decentralized add-ons should be packaged in the same fashion, so it's easy for add-ons to transition from one to another. |
Ah that's true; I think I confused the plugin list with plain old addons because that's where my use cases align most. To that end, I find it a little confusing that there's no way to track versions of addons or see a full list of them akin to npm packages, so that's why I thought maybe utilizing the existing plugins list is best for implementing #7925 . But maybe there's a better way that can help improve clarity for users too, more on that below...
Good idea! Though one of the reasons why Unity's URL loader is nice is because you can simply append
I agree, but my suggestion was more along the lines of this being an additional way to track the sources of an addon allowing Godot to redownload it at a later time. The packages wouldn't have to be packaged differently; they would be structured the same as the Asset Lib addons and this would just give users an additional way to acquire those same types of addons but from a URL as opposed to Asset Lib/direct import. I was thinking the proposed list in #7925 would also keep track of addons acquired through the Asset Lib and addons that you've simply dragged into the res:// folder, as described in my option 3:
But just replace the word "plugins" with "addons" :-) On that note, if we were to start tracking addons and addon sources, could they just be anywhere in the project? Or should there be a specific "addon" folder that Godot can use to manage that stuff more cleanly? Another issue is the lack of configuration for plain old addons, or are we supposed to use plugins for those types of managed libraries even if they don't affect the editor in any way? In which case, now we're just back to 2 separate types of packages (Asset Lib and plugins) and then this whole tracking versions/sources thing makes more sense for plugins only. Hopefully you can see now why it's been confusing to visualize the best direction for this stuff :') Are there any preferences on this from the community or core maintainers? |
Describe the project you are working on
Workflow improvements for the Godot editor
Describe the problem or limitation you are having in your project
Note: I used addons and plugins interchangeably here but what I mean is an extension or library that is meant to be self-contained and managed externally.
I'd like to create packages which aid in the development of Godot projects, but currently the process for importing addons isn't as clean as other engines/platforms due to the lack of dependencies and version management if you forgo the Asset Library. As I've been thinking about what it would take to actually implement #142 (dependency management for addons) I realized we would first need a mechanism to actually retrieve the addons that are listed as dependencies, which may come from Github/some other online source.
Additionally, the official tutorial for installing a plugin has the user go to the Github repo, download the code, and add it manually to your files via the file browser, which isn't quite as user friendly compared to something like npm or Git submodules which allows you to add packages via a single command line.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Something that I really miss from Unity is the ability add a package via URL by inputting it into the engine itself:
Which then allows the engine to internally handle installation and updates for you. I think something like this would be a perfect addition to Godot as it would address 3 different concerns:
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
First, the editor could receive a new suite of functionality for downloading and importing an asset via Git URL. I'm not sure to what extent it already does this for the Asset Library but regardless it would also be nice to expose this as API to the user as well, so that they can do stuff like download optional dependency addons from an addon.
Then, I'm envisioning a button like this in the Plugin window:
The exact icon/wording of the button can be changed but this is a starting point. At first this button would simply prompt the user for a URL, and then it would go through the usual "add plugin" process that you'd go through with the Asset Library. This would be a good proof of concept that the functionality is possible without breaking anything that already exists; essentially it wouldn't keep track of anything you download, it's just another option for installation.
Finally, (or perhaps in place of the above step if its worthwhile) #7925 could be implemented using this functionality and with that we have 3 options:
For simplicity on the user end, I believe option 3 makes the most sense but will require a larger rewrite of the existing plugin management system. Hopefully some discussion on this can clear up the best possible direction if this sounds like a good idea. For now though, this proposal is mainly to kickstart the functionality and button that I mocked up.
If this enhancement will not be used often, can it be worked around with a few lines of script?
N/A
Is there a reason why this should be core and not an add-on in the asset library?
Probably possible to be built as an addon, but since it affects UX it would be best for everyone to get it. Also, it's meant to help create a practical step towards some of the other proposals discussing the future of addons, such as #1205
Let me know if this sounds useful or if there's a better way to implement this sort of package management type of functionality that pairs nicely with the other proposals :)
The text was updated successfully, but these errors were encountered: