I’m comfortable with blueprint and c++ but I figured it wasn’t c++ specific so I’m putting it here.
I’m spawning a bunch of trees for my land generation. They’re replicated actors and replicate just fine. But the problem is it’s (understandably) slow to replicate. I’m spawning 50 to 100 trees at a time as the player reaches the boundaries of the current land and the player, if they move fast enough, will see the trees popping up as the networking catches up.
Are there any techniques I might use to improve the speed at which the trees populate for the player? There are some properties on the tree itself (ex: health) that need to be replicated so I don’t see a way to avoid replicating the actor. Maybe I could simply have the server send the client an array of data to spawn static meshes at… and if the player interacts with the tree, swap it out for a replicated actor. Not sure if this would be much better but it seems possible.
Anyway, I’d appreciate any thoughts on this.
Edit: To clarify, the SpawnActor is happening in C++ and the trees are BP actors