- Home /
Network.Instantiate doesn't work for buffered players
So I am using Network.Instantiate with Item Spawners. When I host the server, the items spawn perfectly, and when I join it should spawn too as Network.Instantiate uses buffered RPC calls. However, it does not seem to work for me and I get these errors on the console. (NOTICE THAT THESE CONSOLE ERRORS ARE RECEIVED ON THE CLIENT, NOT THE HOST)
I DO have networkViews on both the spawner AND the object spawned.
Any help is appreciated, william9518
Answer by william9518 · Oct 28, 2013 at 10:56 PM
I am extremely stupid as it turns out. Apparently the spawner is able to spawn the item BEFORE my level loads, so when it loads it destroys my item. I had to add a DontDestroyOnLoad(gameObject); line onto my ItemScript so that it will not get destroyed.