Hi community,
i want to make a multiplayer game in unity. First time i tried it with a local connection and it works. Now i have a linux server. I want to inatialize the master server on it and make a c# script in unity to connect clients and play on this server.
My server has this software: CentOS 6 with Parallels Plesk Panel 11.5 (64 Bit)
But i can choose between this, too:
- CentOS 6 Minimalsystem (64 Bit)
- ubuntu 12.04 LTS Minimalsystem (64 Bit)
- openSUSE 12.3 Minimal (64 Bit)
- openSUSE 12.3 with Parallels Plesk Panel 11.5 (64 Bit)
- openSUSE 13.1 Minimal (64 Bit)
- Debian 7.0 Wheezy Minimalsystem (64 Bit)
I tried to follow this little “tutorial”: Unity Master Server on Linux - Questions & Answers - Unity Discussions but if i write “make ./MasterServer” in the console it says that there is nothing to done.
Then i tried to connect to the server with unity and this little script:
public class NetworkManager : MonoBehaviour {
public GameObject playerPrefab;
private string serverip = "******";
private int serverport = 25000;
void Start()
{
}
void OnGUI()
{
if (Network.peerType == NetworkPeerType.Disconnected)
{
if(GUI.Button(new Rect(100, 100, 100, 100), "Connect"))
{
Network.Connect(serverip, serverport);
}
}
}
void OnConnectedToServer()
{
SpawnPlayer();
}
private void SpawnPlayer()
{
Network.Instantiate(playerPrefab, new Vector3(0f, 0.5f, 0f), Quaternion.identity, 0);
}
}
But there is an error like this: “The connection request to ******:25000 failed. Are you sure the server can be connected to?”
Now i have some questions:
- Which server software should i use, which i named or should i change to a windows server?
- What am i doing wrong? I’m very new on this special field: “multiplayer”.
- Do you know a tutorial which helps me making a master server?
Sorry for my bad english, i tried my best! I hope someone can help me