#Best practises for having a shared set of stuff used over several projects with Godot

1 messages · Page 1 of 1 (latest)

crude patrol
#

I have some common functionality: front end stuff, options screen, a method to go between levels etc.

My instinct is that i want to wrap this up and reuse it instead of copy-pasting it around, as I still find bugs/make improvements to it

Is this a pure source control thing, or can I go it some clever godot way as a addon? Rightnow I'm using git which is not super familiar to me (much more used to p4)

opinions welcome, direct examples even more so!

severe cave
#

Well, addons can have scenes in them as well. There are examples of addons such as Terrain3D that come with a complete demo scene + scripts. I imagine having your own personal addon of convenient scripts/scenes could be an option. And of course, adding it to a VCS is always useful too.

I've never made an addon before, but a lot of them seem to be mostly gdscript from what I've downloaded. Keep in mind that if you were to want to make changes, you should remember to change them in the actual addon code, not your current project

crude patrol
#

I looked in the docs and there was a section for 'editor plugins' but that's different from addons? Are there guidelines or anything to comply with to create an addon?

#

(sorry I am ignorant of this aha)

#

I guess the crux is that I don't want/need to upload it to the asset library, so this is just putting some files into res://addons/ folder maybe

severe cave
#

From what I could see, you add editor plugins to addons so I assume they serve the same purpose

prisma otter
#

You can just put your shared code/scenes in a folder and copy that folder to new projects.
As long as you include all of its dependencies (or store them inside the scene itself by making them local) they should work out of the box.