Hope I can help, doubt it, but who knows. It is my understanding that objects spawned from the server (that are in the NetworkManager spawnable prefabs list (or registered to it through code) that are spawned on the server using NetworkServer.Spawn) is that when the client connects to the server, the spawned objects are automatically spawned on the client with their current state. I believe this means that these objects do not need to be spawned through any SpawnObjects() code on the client.
NetworkServer.SpawnObjects() tells the server to spawn more of the network identity objects, which are likely already spawned on the network (as they were when the server started). I don’t believe this function needs to be called in the OnClientConnect method, as the networkidentity spawned objects on the server should be automatically spawned.
Also be sure that the networkidentity is on the root gameobject of the prefab.
Also sorry for the extremely long run on sentences, best of luck. If you do figure it out, be sure to post what the problem/solution was, as I’m sure many others will have similar problems eventually with the new networking system.
I got it working. In my case it was the player prefab. I had to recreate it from scratch and then it worked.
Took me two days of unsuccessfully trying to find the problem by messing around with the Networking classes - which was not at all necessary. It could be some bug in how prefabs are read by the client routines in the api.
I was also having this problem. I deleted my Library folder and everything started to work after Unity rebuilt it on startup. Thanks Faloon, it would have taken me a while to go down that road if it wasn’t for your post.
What the heck? I had this exact same problem myself, and somehow remaking the networked prefab from scratch fixed it too. I’m happy, but also kinda annoyed that this happens.