IssueRaiser

New Add-On (sub-project) system

After discussing with @bojidar-bg I think we reached some general idea on how the add-on system could be improved. Currently, the add-on system has many limitations: * Requieres unique and absolute paths * Makes it difficult to test self-contained * Causes problems with duplicated information in files such as project.godot, README.md, .gitignore,etc. Most of the feedback for the current system centers on that it should be great if it could be possible to: * Just write the add-on as a godot project * Do not include the root directory * Be able to install it anywhere in the project and likewise remove it * Be able to simply check out an addon using git to a sub-directory of an existing project and keep it up to date this way So, we've been discussing this for a while and reached the following proposal, which I believe allows to implement this in the simplest way. Writing an add-on will work as follows. It will not be an add-on in itself, but a sub-project: 1. Create a new project, this will be the add-on. 2. Make the add-on as if it was a project in itself. 4. Resources (And this includes scripts) will have a new function named get_project_path(). If you are writing a script in C#/GDNative you can query for the base path. When running the project as sub-project, it will be res://. When running in the game it will be the path to the subproject. 5. For GDScript this process can be transparent, so nothing needs to be done, scripts will just work. Just use res:// normally w

Posted by reduz on May 26, 2018, 1:28 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

ux (Other)

New Add-On (sub-project) system

reduzMay 26, 2018, 1:28 PM

After discussing with @bojidar-bg I think we reached some general idea on how the add-on system could be improved. Currently, the add-on system has many limitations: * Requieres unique and absolute paths * Makes it difficult to test self-contained * Causes problems with duplicated information in files such as project.godot, README.md, .gitignore,etc. Most of the feedback for the current system centers on that it should be great if it could be possible to: * Just write the add-on as a godot project * Do not include the root directory * Be able to install it anywhere in the project and likewise remove it * Be able to simply check out an addon using git to a sub-directory of an existing project and keep it up to date this way So, we've been discussing this for a while and reached the following proposal, which I believe allows to implement this in the simplest way. Writing an add-on will work as follows. It will not be an add-on in itself, but a sub-project: 1. Create a new project, this will be the add-on. 2. Make the add-on as if it was a project in itself. 4. Resources (And this includes scripts) will have a new function named get_project_path(). If you are writing a script in C#/GDNative you can query for the base path. When running the project as sub-project, it will be res://. When running in the game it will be the path to the subproject. 5. For GDScript this process can be transparent, so nothing needs to be done, scripts will just work. Just use res:// normally w

Comments (0)

No comments yet. Start the discussion.

Comment on this issue