Trees make my network game lag?

I’m making a FPS multiplayer networked game just for fun, and I wanted to put a forest in the level. That worked fine, but now when I run it and there’s lot of trees around, the network starts to lag horribly. My computer is definitely up to the task, and it plays perfectly in the editor, but when I start to use the network in the build version, the trees make it almost unplayable. Any ideas?

Are you using “network spawn” to make the trees? If so, that’s a lot of data being sent each frame (position/rotation/scale for each tree.)

As long as they are spawned in the same places, the trees probably don’t need to be continuously synched up between clients – each client can Instantiate them normally. To get the same locations, have the server pick spots and send to everyone using something like (from memory) NetworkView.RPC("spawnTree", x, z, RPC.All);. SpawnTree instantiates at x,z and height(x,z).