Best way to make two GameObjects merge into one

I have a top down view vid a grid were you can place down a “wall” and when I place two walls beside eachother, I want them too combine into 1 wall that’s 2 “grids” long. Mostly for performance reasons when there is a lot of objects

I want something like how rimworld or prison architect does it, so if you have an idea please tell.

I am not sure if you found out yet or not, I assume you did. But just to officially answer this question there is a way to do this in the hierarchy. I wanted to combine multiple walls to form one big wall. I expanded one wall while all the other walls were collapsed. Then, I held shift and selected the walls except for the expanded wall. Then i just click and drug it under the wall to make it a child of that one wall. I hope that makes sense.