Heyy guys can you please help me out!
Assets/_Scripts/NetworkMang.cs(22,25): warning CS0618: UnityEngine.Network.InitializeServer(int, int)' is obsolete:
Use the IntializeServer(connections, listenPort, useNat) function instead’
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class NetworkMang : MonoBehaviour {
public string PlayerName;
public string MatchName;
public static NetworkMang Instances;
public List<Player> PlayerList = new List<Player>();
void Start () {
}
void Update ()
{
}
public void StartServer(string ServerName, int MaxPlayers)
{
Network.InitializeSecurity();
Network.InitializeServer(MaxPlayers, 25560);
MasterServer.RegisterHost("DeathMatch", ServerName);
Debug.Log ("Started Server");
}
}
[System.Serializable]
public class Player
{
public string PlayerName;
}