Instantiate Network Owner

Hello there. I am working on a respawn system that operates like this:

  1. Player A kills Player B
  2. Player B updates an object called UserStorage that requests a respawn from the server
  3. Server sends time until respawn
  4. UserStorage instantiates a new ship for Player B when time is up

The problem I am having is that any object originally in the scene is owned by the server(As in the NetworkView.owner is 0 for the server)

Also when I call Instantiate() the owner is the server

The only way I can get the UserStorage to be owned by the player is to call a Network.Instantiate, which means that every client now has a UserStorage for that player, which seems unneeded.

So my question is this, is there any way to do a local instantiate call and have the owner be the client the instantiates it rather than the server?

If you need only one local instance of an object use Object.Instantiate rather than Network.Instantiate which definitely will create an instance for all players.

Please give as more info on your architecture? Is UserStorage a singleton (one static object) or what?

Not sure it helps... but most networked multiplayer games I've seen in unity don't actually destroy player objects when they get "killed" as it is unnecessary in most cases, and you'd lose all the data in the scripts on that player.

It'd be better to play your death sequence (death animation, explosion, whatever), disable the renderer, disable control scripts, then set the transform position to the position of the spawn point, then re-enable everything.