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.
Sorry, I’m kinda new and I’m having some trouble understanding what you mean with the for loop solution, could you maybe show me an example so that I know I’m doing it correctly?
The above solution is somewhat like lazy loading method, It will spawn a 100 actors and then have a delay of tick and then will do it again.
To get integrate this solution in your logic you have to split the saved Classes array you are using. You have to take first 100 elements of the array then follow the above solution. Make sure to update the Start Index properly and you can use the index to get the class from the array and spawn the actor only when the index is valid
The infinite loop error seems to have stopped, but now I’m getting a bug where it spawns 3 times the amount of blocks it’s supposed to (it can load the first 100 fine)
is it possible you have duplicates of the Blueprint? otherwise you’ll have to debug though it, maybe put a printstring on the Index and see if you get unexpected calls