-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Proposal regarding Plugins, their structure and the AssetLib #18131
Comments
I develop my plugin like a project having only an |
BTW, I recently learned that you can exclude files from the zip download from GitHub by using the |
@Zylann Yeah, that's almost exactly how I started out. Maybe I was too extreme with "all demos should be separated". I don't see too much of a problem with small demos (especially if they are tests) inside the plugin folder so long as they work out of the box, but there can come a point where they get out of hand or like I did, or you need the But let's say I use the I was also thinking of any other possible solutions and switching to some global plugin system could eliminate many of these issues as well because then a plugin could theoretically be housed inside a demo project, but then what to do then when the user wants to modify the code? There it gets messy again. This way, there's another benefit, let's say you download a plugin, you find a problem. You can either clone the repo or a fork, or if you already made changes over a download from a zip/assetlib it's still possible to init a repo, fetch changes, and keep your changes. From there you could do a pull request or even just keep pulling new updates over yours (in the case the change is project specific). All from within your project, other projects could still use other versions. |
The only problem with this solution (which was discussed in some other issues, BTW), is that all paths in Godot's scenes and scripts are scoped to the project, and are not relative. That would mean that if the plugin is put in the wrong folder, bad things would happen. On the other hand, we might enforce a "path" field in the plugin.cfg file, which would be checked for mismatches. Going further, we can make it a |
Has it, I didn't find anything, can you link? I found discussions on global plugins (which as I mentioned only gets rid of some problems. I'm not to fond of it as a solution), but nothing similar to what I'm proposing.
I'm not sure what you mean? Plugins would remain relative to the project. Paths would be set by the developer somewhere (I mentioned the Would there be any problems with this? |
@AlansCodeLog Well, I can't think of potential problems, so I'm going to discuss it with the other devs. Having the readme, etc. of the addon inside addons/xx/ is going to solve a lot of headaches. |
I was thinking about the following, let me know what you guys think. Of course, this breaks compatibility but it may be worth it. When a user creates a project in Godot project manager, user can choose between creating a project or a add-on If creating an add-on, the following will happen:
Now, when you install Godot into a project, the following might happen:
This would allow you to add stuff like new input bindings, translations, etc. that come from add-ons. Of course one problem with this is that I'm not sure if all meaningful settings right now are saved in individual properties. It will work for input bindings, but It may not be the case with translations, or translation remaps, which is a problem, this will need to be looked at. What do you think? |
Continued here: #19178 |
Referenced similar topic earlier: #12153 |
Closing in favor of godotengine/godot-proposals#554, as feature proposals are now tracked in the Godot proposals repository. |
I was initially just going to file an issue over at godot-docs regarding the missing plugin submission guidelines, but the more I've worked on a plugin the more I realized there are wider issues than the missing documentation, like the current recommended structure for the plugins (
addons/author.pluginname/
).If you have a demo project for your plugin, it's tempting as I did to just put this all in one repo, except as I was told, a plugin can't be a project, which okay, makes sense. So I separated the plugin demo project/test scenes into another repo (because custom actions set in the project.godot file were needed for the demos to work). The problem now becomes working on the addon from within the plugin's demo repo. I cannot for example, add the plugin as a git submodule because of the root addon folder. The only work around I've found is to symlink the plugin's folder. But then this means that I have to somehow keep track of which commit corresponds to which plugin version (since the godot project doesn't keep track of this).
My proposal is a plugin should just be a repo's root (e.g. Blender plugins are like this). The author's name should not factor in1 (though the plugin.cfg could contain info regarding the author, repo, demo repo, etc which Godot could present to the user if necessary). Readme's, licenses, etc should always be there right along with the plugin. Demos should always be separated. There should only be a finite number of places a plugin can be installed (addons, assets, etc), and this could be set when submitting to the asset lib (it could be determined by it's category/type?), or maybe it could be in the plugin.cfg file.
This all excludes templates, of course, which can remain as they are.
This has several benefits:
More benefits (edits):
Of course, this is just an idea. I don't know if there are situations where this might cause problems.
The only issue I can see is that demo repos with submodules would not contain their plugins unless git cloned recursively, but this could be fixed when some kind of plugin management is implemented. If the project kept track of it's plugins and their versions, it could auto-install plugins when the files are missing. This would also make it easy to reuse projects as templates, including it's plugins.
The text was updated successfully, but these errors were encountered: