Instanced Static Mesh replication issue

I got it to work!!!

Here is my best explanation:

I am using the procedural foliage generator from 4.8. I have the server store a non replicated array of hidden trees. You don’t need to know the state of all trees, just the hidden ones.

I made a replicated BP called ResourceNodeHandler that has functions to help edit the Instanced Static Mesh from the procedural foliage generator. The array of “dead” trees is not replicated.

When you hit a tree (run on server) add the dead tree’s instance ID to the non-replicated array in ResourceNodeHandler. Then multicast to hide that particular mesh for all connected clients.

Now to new clients joining mid game. On your PlayerController create an event that is Run On Owning Client with a input for an array of ints. This will be your dead trees. On that event just handle looping through and hiding all the dead ones.

In your GameMode event OnPostLogin you will cast the player and then run that new PlayerController event you made. Pass in the InstanceIDs and you are good to go! You will probably need to add a delay loop for OnPostLogin because its possible some actors haven’t spawned yet on the client.

GameMode Blueprint

PlayerController Event to handling incoming data. Only runs on client.

**ResourceHandler Actor that does keeps track of dead tree array on server and does multicast on active clients.
**

**After PlayerController gets the array of dead trees, loop through it and hide them.
**