So, I’m making a multiplayer game. I use am using
// Checking if you are connected to the server or not
if (Network.peerType == NetworkPeerType.Disconnected)
{
// If not connected
if (GUI.Button (new Rect(10,10,100,30),"Connect"))
{
Network.useNat = useNAT;
// Connecting to the server
Network.Connect(remoteIP, remotePort);
}
if (GUI.Button (new Rect(10,50,100,30),"Start Server"))
{
Network.useNat = useNAT;
// Creating server
Network.InitializeServer(32, listenPort);
// Notify our objects that the level and the network is ready
for (var go : GameObject in FindObjectsOfType(GameObject))
{
go.SendMessage("OnNetworkLoadedLevel",
SendMessageOptions.DontRequireReceiver);
}
}
However, this makes three errors come up.
Assets/multiplayer/connectionGUI.js(16,41): BCW0012: WARNING: ‘UnityEngine.Network.useNat’ is obsolete. No longer needed. This is now explicitly set in the InitializeServer function call. It is implicitly set when calling Connect depending on if an IP/port combination is used (useNat=false) or a GUID is used(useNat=true).
Assets/multiplayer/connectionGUI.js(22,41): BCW0012: WARNING: ‘UnityEngine.Network.useNat’ is obsolete. No longer needed. This is now explicitly set in the InitializeServer function call. It is implicitly set when calling Connect depending on if an IP/port combination is used (useNat=false) or a GUID is used(useNat=true).
Assets/multiplayer/connectionGUI.js(24,41): BCW0012: WARNING: ‘UnityEngine.Network.InitializeServer(int, int)’ is obsolete. Use the IntializeServer(connections, listenPort, useNat) function instead
I have no idea what these mean. Any help?