- Home /
Question by
Eiseno · Dec 29, 2015 at 04:18 AM ·
networkingnetworklobby
Network Lobby Manager Spawn Selected Prefab for Client
Hi, I want make each client can select their player prefab in lobby and when game start i want instantiate selected prefab for client.I define varible in LobbyManager but its not working.Its always same with host.How can i make this ?
public override GameObject OnLobbyServerCreateGamePlayer(NetworkConnection conn, short playerControllerId)
{
Debug.LogError(playerPrefabIndex + "Ins Index");
GameObject playerPrefab = (GameObject)Instantiate(spawnPrefabs[playerPrefabIndex]);
NetworkServer.Spawn(playerPrefab);
return playerPrefab;
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612054148im_/https://answers.unity.com/themes/thub/images/avi.jpg)