Hi, I’m new to Defold, and I’m a little confused about the function of collections vs folders. They seem to accomplish the same purpose (grouping files together), but are somehow different, and sometimes collections align with folders while sometimes they don’t. Could someone explain what the purpose of collections is?
Welcome to Defold!
The Assets panel on the left is how your project is structure your files on disk. It has nothing to do with how you reference them in your code or when building scenes. You can arrange these files any way you want that makes sense to you. You can also rearrange them at any time. References to them in your scenes will automatically update.
Collections and game objects on the hand define how things are structured in the running game. They are described in detail in the Building Blocks manual. You reference things in your game through either a unique id or a URL. The URL is in many ways similar to a URL on the web since it allows you to address a unique resource. You can either be explicit and use an absolute ULR or you can use relative addressing. This is described in the Addressing manual.