I am creating a 2D top down space base building game (my first game), and when I place ‘modules’ next to each other I want them to connect. I want a main game object which manages the entire ‘module’, and then seperate child game objects which display each of the tiles of the module and update the sprite image depending on whether there is something next to it it needs to attach to. I want to store all the tile sprites on the main game object, but I am wondering what is the best way to store them so they can be imported easily and accessed easily from the child tiles that render them. I could have an array of sprites and drag them all into the inspector, but this doesn’t seem like the best approach, especially as I want to draw the module in photoshop as one piece and not have to split it all up. I have heard some stuff about atlas’s and spritesheets, but I’m not sure if these are something I can just store as a group in a game object? Advice would be appreciated.
When you import an image, you can set it to multiple instead of single. This lets you then go in and cut it up. If you’re doing square pieces, this would work perfectly fine. Then there are ways to access the individual pieces if needed.