Hi All,
This is hard to explain but i will do my best. (Note i am not a programmer and have had no formal programming training, if i use a programming term incorrectly, please accept my apologies)
I am building a farming sim (think stardew valley/harvest moon)
I have made a 20x20 grid. Each tile on the grid is an individual game object called plot1, plot2, plot3 etc.
Using a Jagged list i am able to load the position of each of each plot and access it through a variable called tilearray2D*[j]*
This has worked well so far and i have been able to create a plot that grows game corn (yay!)
Now i am working on 2x2 objects such as rocks. I have been able to get the 2x2 rock to spawn. This is done by replacing the graphics on 4 tiles with a rock graphic and applying a box collider 2D. However this issue is that unity still treats this 2x2 rock as 4 individual game objects.
This makes it hard to destroy the rock in game as when you destroy 1 of the 4 game objects in the 2x2, it just destroys one game object and the other 3 still remain.
Has anyone been able to make 4 gameObjects be treated as 1?
I hope my explanation makes sense? if not, please let me know and i can try to add some additional info such as code snippets
Thank you