Hello !
I’ve been having a hard time with this and reading the threads, everyone seems confused.
Using the amazing UNET, I’m trying to spawn a player on client programmatically.
I start the client and then would like to add the player using AddPlayer, but it takes a connection which somehow is null:
NetworkClient client = NetworkManager.singleton.StartClient ();
(client is null…)
ClientScene.AddPlayer(…
I’ve also tried to use OnServerAddPlayer(), but it’s never getting called.
I’ve tried NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
But again connection is null.
Now we all know we can easily add players automatically using NetworkManager, but this won’t work for me as it also creates a player on the server since the server also has a client.
Any help would be greatly appreciated,
Thank you in advance.
Yohann