I’m new to using godot and have started a small project. While looking around the community I found an addon that seemed to fit well into my project and I included it. As I progressed, I realized that I needed more functionality from the addon, and I’ve made changes/additions to it.
The changes I’ve made have been largely within the addon folder. My concern is if this is the correct place for these changes. Are the changes I’ve made “safe” in the addon folder? (I’m concerned about updates of the addon.) Should the changes be moved to a different location, such as another folder within the addon folder or perhaps within the main project itself?`
Any help would be appreciated. File structure is something I’ve been working on understanding in godot.
If you update the addon and something changes in the class’s public interface, having your changes live in some other directory isn’t going to do you much good. Your code will still break.
Are your changes specific to just your project, or are they general enough where anyone would benefit from them? In the latter case, consider contacting the original author and ask if they are interested in pulling your changes.
What you’re doing is exactly what the add-on developer is doing to create it so you won’t break anything. However if you update, anything the developer changed could overwrite your changes. Backup before you update. You could certainly contribute to the repo, or fork it and update your fork.
If you want to be able to incorporate future updates from the addon then don’t touch anything in that addon’s folder (you can make separate addon subfolder if you want). Extend it using new files in a different folder, for example creating a subclass of one of the addon classes to add the functionality you want. This won’t guarantee that nothing will break if you update the addon, but it will save you from having to remember/look up what you did and re-apply the same changes repeatedly.