Guest User

Untitled

a guest
Dec 14th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) {
  2. NetworkPlayer newPlayer = Instantiate<NetworkPlayer>(m_NetworkPlayerPrefab);
  3. DontDestroyOnLoad(newPlayer);
  4. NetworkServer.AddPlayerForConnection(conn, newPlayer.gameObject, playerControllerId);
  5. }
Add Comment
Please, Sign In to add comment