Is it possible to offload actor spawning onto a separate CPU thread?

I’m making a Minecraft clone to learn the engine some more, and get a better grasp on some best practices.

I have created a “Chunk” actor blueprint, which at the moment contains 8192 “Blocks”. Only takes half a second or so to spawn one of these. But at the moment I’m just checking if I need to spawn a new row of them in Event Tick, and then I spawn one at a time (causing me to have like 2 FPS until the generation is complete).

Is there a way I can create these in a separate thread, and then pop them into the game once they’re loaded?

No, they must exist on game thread, or else spawning actors would happen at different rates, which would break everything.

Also, spawning 8,000 block actors is the worst possible way to go about this. Instanced static meshes is probably the best way to go here. Custom mesh in c++ or voxel plugin is best if you want smooth voxels, but i have no idea where to start with that.

To clarify, the blocks are already HierarchalInstancedStaticMeshes. The “Chunk” is the actor that has up to 8k HISM instances each.

So, there’s no way around freezing the game thread while it loads in the blueprint? Are there other classes that can be loaded in a separate thread, which my “Chunk” could be redefined as?

I would recommend using c++ for something like this. Blueprint hasnt really been optimized at all since launch, and its still using a lot of legacy code from UE3.