The solution to this would vary a lot depending on how you are doing the building part. But have a look at the below and see if it would work for what you’re wanting to do.
This assumes you have some sort of Block class that you are spawning and attaching to placed blocks.
- In your Block class add two Int variables, both editable and exposed on spawn. Index, and AttachedTo.
- When you spawn a block, give each block a unique index. And if it’s attached to another block, also set the AttachedTo variable to the index of the parent block. If the block is not attached to another block, then set AttachedTo to -1 (Maybe this is not relevant to your setup). Something like the below, modified to fit what you have currently:
-
Create a new struct, S_Blocks. Add 3 variables, a vector, location, and two ints Index, and AttachedTo.
-
In your save game blueprint, add an S_Blocks variable and make it an array.
-
In your save function, do this:
- And then your Load function:
Again, might not work for you, but could be a starting point.


