Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Trying to spawn a specific prefab when lobby scene transitions to game scene

$
0
0
Code (csharp):
  1.  
  2.   //Called on server.
  3.   //This allows customization of the creation of the GamePlayer object on the server.
  4.   //By default the gamePlayerPrefab is used to create the game-player, but this function allows that behaviour
  5.   //to be customized.The object returned from the function will be used to replace the lobby-player on the connection.
  6.   public override GameObject OnLobbyServerCreateGamePlayer(NetworkConnection conn, short playerControllerId)
  7.   {
  8.     //default player prefab index...
Trying to spawn a specific prefab when lobby scene transitions to game scene

Viewing all articles
Browse latest Browse all 16796

Trending Articles