Why should it? I don’t think such functionality would make too much sense. Object instantiation and spawning over network seems to be uncoupled by design for good reason.
Note that you can have a look at the NetworkServer source if you want to retrace exactly how it works.
The problem I’m having is that a duplicate is being created. It doesn’t happen with any other objects where I’m using the same pattern but I’ve always had a nagging doubt because this code reads like it will create a duplicate (even though that wouldn’t make sense)
Thanks for the reminder that the source is on bitbucket. Very useful.
So sorry - missed the notification on this post and feel very rude.
My issue was nothing to do with NetworkServer.Spawn. I was actually instantiating the object again on the client in rare circumstances that was hard to debug. Found myself drawn into the red herring that NeworkServer.Spawn might create another instance.
Since we are on the NetworkServer.Spawn topic…
Say I unspawn a player on defeat via NetworkServer.Unspawn and disable colliders, renderers and stuff on the server.
For the next round I want to respawn all defeated players via NetworkServer.Spawn (after enabling disabled stuff).
The problem is that no client has control over his player object.
Does anybody know how to make sure that every player-client gets his player object spawned that he can control?
Oh, and I have nothing checked on the Network Identity, if that matters…