I’m making a simple block building game where you can save and load different worlds.
My problem occurs when loading into a world. Usually it loads everything in fine, but after it has to load in roughly 2,000 blocks, I get the error displayed below.
even if you don’t get that error, i’d recommend you to spawn elements across multiple frames.
also i would recommend to use an array of a struct with classes transforms and tags instead of 3 arrays.
also collision handling “default” could be consuming a lot of time, depending what the default is and what’s set in the object. i would set it to “always spawn dont check for collisions”.
the big question is “why do you need to dynamically spawn 2K objects”? can’t you have something like world partition, data layers, level instance, sublevels, pcg, or other stuff?
also doing it on begin play is not bad, but my gut tells me there could be race conditions if you depend on that somewhere else.