Hey there! While playing around during clamping, I found myself with some code that I might want to reuse. How is a Godot project structured in general in regards to splitting code in different files, creating helpers, reusable components etc?
sorry i missed this one.
theres a couple of camps that im aware off, one would be to put reusable helper methods etc into a global script that is autoloaded, working as a singleton and accessible everywhere.
that ones handy if its a method or such thats needing to be accessed from the entire project and persist.
another one, which seems to make things clearer for myself, would be the idea of node/scene composition.
so I could separate out different behaviours, methods etc and add them as a script to a new node, so i could have a bunch of different nodes that i could instance and attach to scenes,
not something ive delved deeply into, but I definitely have to learn more
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.