Hello,
I have a problem with my multiplayer game.
Here is the script:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
void OnGUI(){
if(Network.peerType == NetworkPeerType.Disconnected){
GUILayout.BeginVertical();
if(GUILayout.Button("Server")){
Network.InitializeServer(5, 25001,false);
}
if(GUILayout.Button("Client")){
Network.Connect("localhost", 25001);
}
GUILayout.EndVertical();
}
}
void OnConnectedToServer(){
Debug.Log("Connect");
}
void OnFailedToConnect(){
Debug.Log("Fail");
}
void OnDisconnectedFromServer(){
Debug.Log("Disconnect");
}
}
I can’t connect to my Server. I haven’t got any errors.
Ps: I am coming from Germany