Search Unity

Best ReSpawn Method?

Discussion in 'Multiplayer' started by p627, Sep 28, 2015.

  1. p627

    p627

    Joined:
    Apr 12, 2014
    Posts:
    23
    Hello, as the title say which is the best way to re-spawn a player after some seconds?

    thanks.
     
  2. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    If you mean, move their existing object on server and client, you could change their NetworkTransform position with a coroutine that is delayed for X seconds.

    If you mean, respawn their destroyed object, you'll need to instantiate their prefab and call NetworkServer.AddPlayerForConnection on the server.