It seems Network.Instantiate is only useful for permanent objects (or player objects that you destroy when they leave) – otherwise you’re going to have an RPC buffer growing out of control.
For example, my game lets the player fire missiles – I have these missiles created with Network.Instantiate (so that their movement can easily be synced across all clients) and they typically don’t last too long before being destroyed. Unfortunately, all these missiles are in the buffer so when a new player connects, the server sends Network.Instantiate calls for all those missiles that have long been destroyed. The new client spawns hundreds of missiles that have already been destroyed.
I could also buffer an RPC to destroy these missiles, but that would be an incredible amount of wasted network traffic that would surely cause problems the longer the server has been running and storing an ever-increasing number of buffered RPC calls.
So… what are my options?
Option 1: To just avoid Network.Instantiate? Instantiating and syncing missiles using just RPC calls is going to be a pain.
Option 2 [edit: Option 2 doesn’t seem feasible because apparently we’re limited to 32 network groups]: To assign each and every missile to it’s own network group? So that I can Network.RemoveRPCsInGroup for that single Network.Instantiate? Is that even feasible?
Seems like there should be a Network.Instantiate that just didn’t buffer anything… or something like Network.Destroy that also removed RPCs for that object. Or am I just missing something?