Question by
DaShawdoX · Jun 10, 2018 at 12:49 PM ·
unity 5networkconnectionhost
Problem connection server unet
Hello, i'm trying to connect a client to a host server but i have a problem : There is my function to host :
> public void Try_To_Host(){
Network.incomingPassword = "password";
Network.InitializeServer (32, 25000);
NetworkManager.singleton.StartHost ();
}
So, with that function, there is a OnServerAddPlayer who create my host player.
Next, i have my function to connect :
> public void Try_To_Connect(){
> Network.Connect ("192.168.1.39",25000, "password");
> //NetworkManager.singleton.StartClient(); This line doesnt resolve the problem
> }
With that function, nothing happend, but when i try to print something in OnConnectedToServer() i can see it on the client site, so it's not a problem of adress ip or port. Any ideas how can i add the client player to the server please?
Comment